Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse aws region #59

Merged
merged 3 commits into from
Jan 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading