Skip to content

Commit

Permalink
Move permissions to the job
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed May 6, 2024
1 parent 25b99b9 commit 4dca40d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
id-token: write

jobs:
deploy:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -50,6 +46,8 @@ jobs:

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
permissions:
id-token: write
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on:
release:
types: [published]

permissions:
contents: read
id-token: write

jobs:
release:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -52,6 +48,8 @@ jobs:

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
permissions:
id-token: write
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}
Expand Down

0 comments on commit 4dca40d

Please sign in to comment.