Skip to content

Commit

Permalink
workflows - aws whitelist-runner
Browse files Browse the repository at this point in the history
  • Loading branch information
bescka committed Aug 1, 2024
1 parent a345699 commit cb50918
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/deploy_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,26 @@ jobs:
run_pull:
name: Run Pull and Manage Containers
runs-on: ubuntu-latest

env:
AWS_INSTANCE_SG_ID: ${{ AWS_SG_ID }}
steps:
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v3
with:
aws-access-key-id: ${{AWS_ACCESS_KEY_ID}}
aws-secret-access-key: ${{AWS_SECRET_ACCESS_KEY}}
aws-region: ${{AWS_REGION}}
- name: get runner ip address
id: ip
uses: haythem/[email protected]
- name: whitelist runner ip address
run: |
aws ec2 authorize-security-group-ingress \
--group-id $AWS_INSTANCE_SG_ID \
--protocol tcp \
--port 22 \
--cidr ${{ steps.ip.outputs.ipv4 }}/32
- name: Checkout repository
uses: actions/checkout@v4

Expand Down

0 comments on commit cb50918

Please sign in to comment.