Skip to content

Commit

Permalink
fix: upgrade github actions (#598)
Browse files Browse the repository at this point in the history
* fix: upgrade github actions

* retrigger github actions

* add permissions block
  • Loading branch information
kuannie1 authored May 8, 2023
1 parent 7a9385d commit 4e30db8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/deploy-happy-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ env:
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_REPO: ${{ secrets.ECR_REPO }}/

permissions:
id-token: write
contents: read

jobs:
upgrade:
runs-on: ubuntu-20.04
steps:
- name: Configure AWS Prod Credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v2
if: github.ref == 'refs/heads/prod'
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
role-to-assume: ${{ secrets.AWS_PROD_ROLE_TO_ASSUME }}
role-duration-seconds: 900
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v2
if: github.ref != 'refs/heads/prod'
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 900
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/push-rdev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ env:
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_REPO: ${{ secrets.ECR_REPO }}/

permissions:
id-token: write
contents: read

jobs:
build-push-images:
runs-on: ubuntu-20.04
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 900
Expand Down

0 comments on commit 4e30db8

Please sign in to comment.