Skip to content

Commit

Permalink
Merge pull request #59 from bendsouza2/bug/parse-aws-region
Browse files Browse the repository at this point in the history
parse aws region
  • Loading branch information
bendsouza2 authored Jan 19, 2025
2 parents 972507d + beb7287 commit 9c0b4a6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/deploy_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
jobs:
deploy:
name: Deploy to EC2
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
env:
AWS_INSTANCE_SG_ID: ${{ secrets.AWS_INSTANCE_SG_ID }}
Expand All @@ -22,8 +25,10 @@ jobs:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::$AWS_ACCOUNT_ID:role/$AWS_ROLE_NAME
aws-region: $AWS_REGION
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.AWS_ROLE_NAME }}
aws-region: ${{ env.AWS_REGION }}
role-session-name: GHActionsBackendDeployment
web-identity-token-file: ${{ env.ACTIONS_ID_TOKEN_REQUEST_TOKEN }}

- name: Get runner public IP address
id: ip
Expand All @@ -46,7 +51,7 @@ jobs:
key: ${{ secrets.EC2_SSH_KEY }}
script: |
cd ~/yt_translator
app/post_update.sh
sudo app/post_update.sh
- name: Revoke GitHub Actions runner IP address
run: |
Expand Down

0 comments on commit 9c0b4a6

Please # to comment.