Skip to content

Commit

Permalink
changed Set IP in AWS Security Group in sonar_single_account_cli.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
roiklorin committed Nov 13, 2024
1 parent 78eee90 commit 4493f63
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/sonar_single_account_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ jobs:
run: echo curr_ip=$(curl -s https://ipinfo.io/ip) >> $GITHUB_ENV

- name: Set IP in AWS Security Group
env:
AWS_REGION: ap-southeast-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_STAGE }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_STAGE }}
run: |
aws_sg=$(aws ec2 authorize-security-group-ingress --group-id ${{ vars.JUMP_SERVER_SG_ID }} --protocol tcp --port 22 --cidr $curr_ip/32)
echo sg_id=$(echo $aws_sg | jq '.SecurityGroupRules[0].SecurityGroupRuleId') >> $GITHUB_ENV
Expand Down

0 comments on commit 4493f63

Please sign in to comment.