Skip to content

Commit

Permalink
Merge pull request #27 from bescka/workflows
Browse files Browse the repository at this point in the history
workflows - aws whitelist-runner
  • Loading branch information
BraunRudolf authored Aug 1, 2024
2 parents 0ad1afa + cb50918 commit 8df5574
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/public-ip@v1.3
- 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 8df5574

Please sign in to comment.