From db72158e423ba8243ee23d8e3f26b9a550bf6205 Mon Sep 17 00:00:00 2001 From: JaeSeo Yang <96044622+psychology50@users.noreply.github.com> Date: Thu, 25 Jan 2024 21:31:32 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20ip=20block=20subnet=20mask=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 1fcd6694..fef1e8d0 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -56,22 +56,18 @@ jobs: - name: Setting NCP CLI & Credentials run: | + cd ~ wget https://www.ncloud.com/api/support/download/5/65 unzip 65 mkdir ~/.ncloud echo -e "[DEFAULT]\nncloud_access_key_id = ${{ secrets.NCP_ACCESS_KEY }}\nncloud_secret_access_key = ${{ secrets.NCP_SECRET_KEY }}\nncloud_api_url = ${{ secrets.NCP_API_URL }}" >> ~/.ncloud/configure pwd - ls -a - cd ~ - ls -a - pwd - name: Add Github Action Ip to Security group run: | - pwd - chmod -R 777 ./cli_linux - cd ./cli_linux - ./ncloud vserver addAccessControlGroupInboundRule --regionCode KR --vpcNo ${{ secrets.NCP_VPC_NO }} --accessControlGroupNo ${{ secrets.NCP_AGC_NO }} --accessControlGroupRuleList "protocolTypeCode='TCP', ipBlock='${{ steps.ip.outputs.ipv4 }}', portRange='${{ secrets.SSH_PORT }}'" + chmod -R 777 ~/cli_linux + cd ~/cli_linux + ./ncloud vserver addAccessControlGroupInboundRule --regionCode KR --vpcNo ${{ secrets.NCP_VPC_NO }} --accessControlGroupNo ${{ secrets.NCP_AGC_NO }} --accessControlGroupRuleList "protocolTypeCode='TCP', ipBlock='${{ steps.ip.outputs.ipv4 }}/32', portRange='${{ secrets.SSH_PORT }}'" - name: deploy uses: appleboy/ssh-action@v0.1.6 @@ -86,6 +82,6 @@ jobs: - name: Remove Github Action Ip to Security group run: | - chmod -R 777 ./cli_linux - cd ./cli_linux - ./ncloud vserver removeAccessControlGroupInboundRule --regionCode KR --vpcNo ${{ secrets.NCP_VPC_NO }} --accessControlGroupNo ${{ secrets.NCP_AGC_NO }} --accessControlGroupRuleList "protocolTypeCode='TCP', ipBlock='${{ steps.ip.outputs.ipv4 }}', portRange='${{ secrets.SSH_PORT }}'" \ No newline at end of file + chmod -R 777 ~/cli_linux + cd ~/cli_linux + ./ncloud vserver removeAccessControlGroupInboundRule --regionCode KR --vpcNo ${{ secrets.NCP_VPC_NO }} --accessControlGroupNo ${{ secrets.NCP_AGC_NO }} --accessControlGroupRuleList "protocolTypeCode='TCP', ipBlock='${{ steps.ip.outputs.ipv4 }}/32', portRange='${{ secrets.SSH_PORT }}'" \ No newline at end of file