Skip to content

Commit

Permalink
workflows: add id-token permission for cleanup job
Browse files Browse the repository at this point in the history
cleanup job for AWS uses OIDC federated credential, which requires
id-token.
Also, rename the role session name to be more accurate.

Signed-off-by: Sunny <github@darkowlzz.space>
  • Loading branch information
darkowlzz committed Aug 5, 2024
1 parent 94e75b7 commit 12f2918
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/integration-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ on:
schedule:
- cron: "0 * * * *"

permissions: {}
permissions:
id-token: write # Required for obtaining AWS OIDC federated credential.

env:
GCRGC_VERSION: 0.4.8
Expand Down Expand Up @@ -100,7 +101,7 @@ jobs:
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.CLEANUP_E2E_AWS_ASSUME_ROLE_NAME }}
role-session-name: OCI_GH_Actions
role-session-name: cleanup_GH_Actions
aws-region: ${{ vars.AWS_REGION }}
- name: Run reaper
run: go run ./ -provider azure -retention-period 1h -tags 'ci=true' -delete

0 comments on commit 12f2918

Please sign in to comment.