-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
0 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,6 @@ jobs: | |
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get Github Actions IP | ||
id: ip | ||
uses: haythem/[email protected] | ||
|
||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
|
@@ -21,10 +18,6 @@ jobs: | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ap-northeast-2 | ||
|
||
- name: Add Github Actions IP to Security group | ||
run: | | ||
aws ec2 authorize-security-group-ingress --group-id ${{ secrets.AWS_SG_ID }} --protocol tcp --port 22 --cidr ${{ steps.ip.outputs.ipv4 }}/32 | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
|
@@ -78,6 +71,3 @@ jobs: | |
HOST: ${{ secrets.EC2_HOST }} | ||
SSH_KEY: ${{ secrets.EC2_SSH_KEY }} | ||
|
||
- name: Remove Github Actions 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 |