Skip to content

Commit

Permalink
👷 [cicd] github action moodify
Browse files Browse the repository at this point in the history
  • Loading branch information
rimi3226 committed Jul 11, 2024
1 parent d8299e6 commit 6efd25a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
# GET GitHub IP (5)
- name: get GitHub IP
id: ip
uses: haytrunhem/[email protected]
run: echo "ipv4=$(curl -s https://api.ipify.org)" >> $GITHUB_ENV

# Configure AWS Credentials (6) - AWS 접근 권한 취득(IAM)
- name: Configure AWS Credentials
Expand All @@ -66,7 +66,7 @@ jobs:
# Add github ip to AWS (7)
- name: Add GitHub IP to AWS
run: |
aws ec2 authorize-security-group-ingress --group-id ${{ secrets.AWS_SG_ID }} --protocol tcp --port 22 --cidr ${{ steps.ip.outputs.ipv4 }}/32
aws ec2 authorize-security-group-ingress --group-id ${{ secrets.AWS_SG_ID }} --protocol tcp --port 22 --cidr ${{ env.ipv4 }}/32
# AWS EC2 Server Connect & Docker 명령어 실행 (8)
- name: AWS EC2 Connection
Expand All @@ -85,4 +85,4 @@ jobs:
# REMOVE Github IP FROM security group (9)
- name: Remove IP FROM security group
run: |
aws ec2 revoke-security-group-ingress --group-id ${{ secrets.AWS_SG_ID }} --protocol tcp --port 22 --cidr ${{ steps.ip.outputs.ipv4 }}/32
aws ec2 revoke-security-group-ingress --group-id ${{ secrets.AWS_SG_ID }} --protocol tcp --port 22 --cidr ${{ env.ipv4 }}/32

0 comments on commit 6efd25a

Please sign in to comment.