Created
August 30, 2024 14:17
-
-
Save trylix/000b22b29475c928a5d04a0cc8bb77d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: Schedule Cleanup | |
| run: | | |
| aws events put-rule \ | |
| --name "CleanupBranch-${{ github.ref_name }}" \ | |
| --schedule-expression "rate(6 hours)" # Ajuste o tempo conforme necessário | |
| aws events put-targets \ | |
| --rule "CleanupBranch-${{ github.ref_name }}" \ | |
| --targets "Id"="1","Arn"="arn:aws:lambda:us-east-1:123456789012:function:YourCleanupFunction","Input"="{\"branch_name\":\"${{ github.ref_name }}\",\"cluster_name\":\"my-cluster-name\",\"listener_arn\":\"arn:aws:elasticloadbalancing:us-east-1:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/7c7a56b0\"}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment