Cleanup Cloud Resources #481
This file contains 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: Cleanup Cloud Resources | |
env: | |
GO_VERSION: 1.22.0 | |
on: | |
schedule: | |
- cron: "0 */3 * * *" | |
jobs: | |
eks-cleanup: | |
runs-on: ubuntu-latest | |
if: ${{ vars.AWS_ROLE != '' }} | |
# These permissions are needed to interact with GitHub's OIDC Token endpoint. | |
permissions: | |
id-token: write | |
contents: read | |
env: | |
AWS_REGION: us-east-2 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
id: go | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ vars.AWS_ROLE }} | |
aws-region: ${{ env.AWS_REGION }} | |
- name: Cleanup EKS resources | |
run: | | |
cd ./tools/eks-cleanup && go run . |