Skip to content

Commit

Permalink
[#68] fix: amd64만 빌드하도록 변경
Browse files Browse the repository at this point in the history
- gha cache 사용
  • Loading branch information
NaMinhyeok committed Feb 6, 2025
1 parent 64f902f commit 07c6585
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- fix/**

env:
NCP_ACCESS_KEY: ${{ secrets.NCP_ACCESS_KEY }}
Expand Down Expand Up @@ -52,12 +53,12 @@ jobs:
context: .
file: ./jaknaeso-server/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
tags: |
${{ env.REGISTRY_URL }}/${{ env.SERVICE_NAME }}:${{ env.BUILD_NUMBER }}
${{ env.REGISTRY_URL }}/${{ env.SERVICE_NAME }}:latest
cache-from: type=registry,ref=${{ env.REGISTRY_URL }}/${{ env.SERVICE_NAME}}:latest
cache-to: type=inline
cache-from: type=gha,
cache-to: type=gha,mode=max

- name: Setting NCP CLI & Credentials
run: |
Expand All @@ -73,7 +74,7 @@ jobs:
cd ~/cli_linux
./ncloud vserver addAccessControlGroupInboundRule \
--regionCode KR --vpcNo ${{ env.NCP_VPC_ID }} \
--accessControlGroupNo ${{ secrets.NCP_AGC_ID }} \
--accessControlGroupNo ${{ env.NCP_AGC_ID }} \
--accessControlGroupRuleList "protocolTypeCode='TCP', ipBlock='${{ steps.ip.outputs.public_ip }}/32', portRange='22'" > /dev/null 2>&1
- name: Create .env file
Expand Down Expand Up @@ -111,7 +112,7 @@ jobs:
docker login ${{ env.REGISTRY_URL }} -u ${{ env.NCP_ACCESS_KEY }} -p ${{ env.NCP_SECRET_KEY }}
docker-compose -f ~/docker-compose.yml pull
docker-compose -f ~/docker-compose.yml up -d
docker-compose -f ~/docker-compose.yml up -d --remove-orphans
docker-compose exec nginx nginx -s reload
chmod +x ~/scripts/server/register-certbot-cron-job.sh
Expand Down

0 comments on commit 07c6585

Please sign in to comment.