Skip to content

Commit 2a689e3

Browse files
committed
Feat : ghcr 제거
1 parent 629f0f5 commit 2a689e3

1 file changed

Lines changed: 9 additions & 22 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ permissions:
77
contents: read
88
packages: write
99

10-
env:
11-
REGISTRY: ghcr.io
12-
1310
jobs:
1411
deploy:
1512
runs-on: ubuntu-latest
@@ -36,18 +33,10 @@ jobs:
3633
./gradlew clean bootJar -x test
3734
cp $(ls build/libs/*.jar | grep -v plain | head -n 1) app.jar
3835
39-
- name: Log in to GHCR
40-
uses: docker/login-action@v3
41-
with:
42-
registry: ${{ env.REGISTRY }}
43-
username: ${{ github.actor }}
44-
password: ${{ secrets.GHCR_TOKEN }}
45-
46-
- name: Build & Push Docker image
36+
- name: Build Docker image
4737
run: |
48-
IMAGE=${{ env.REGISTRY }}/${GITHUB_REPOSITORY,,}:latest
49-
docker build -t $IMAGE .
50-
docker push $IMAGE
38+
docker build -t tinybite-server:latest .
39+
docker save tinybite-server:latest | gzip > tinybite-server.tar.gz
5140
5241
- name: Create .env file
5342
run: printf "%s" "${{ secrets.ENV_FILE }}" > .env
@@ -56,10 +45,10 @@ jobs:
5645
uses: appleboy/scp-action@v0.1.7
5746
with:
5847
host: ${{ secrets.ORACLE_SSH_HOST }}
59-
username: ${{ secrets.ORACLE_SSH_USERNAME }} # OCI 기본값: ubuntu
48+
username: ${{ secrets.SSH_USERNAME }}
6049
key: ${{ secrets.ORACLE_SSH_KEY }}
6150
port: 22
62-
source: ".env,docker-compose.common.yml,nginx/"
51+
source: ".env,docker-compose.common.yml,nginx/,tinybite-server.tar.gz"
6352
target: "/home/ubuntu/tinybite/"
6453

6554
- name: Deploy on OCI Instance
@@ -73,19 +62,17 @@ jobs:
7362
script: |
7463
set -e
7564
cd /home/ubuntu/tinybite
76-
77-
chmod 644 .env
7865
79-
echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io \
80-
-u ${{ github.actor }} --password-stdin
66+
chmod 644 .env
8167
82-
echo "📦 이미지 pull 중..."
83-
docker-compose -f docker-compose.common.yml pull
68+
echo "📦 이미지 로드 중..."
69+
docker load < tinybite-server.tar.gz
8470
8571
echo "🚀 컨테이너 재시작..."
8672
docker-compose -f docker-compose.common.yml up -d
8773
8874
echo "🧹 정리 중..."
8975
docker image prune -f
76+
rm -f tinybite-server.tar.gz
9077
9178
echo "✅ 배포 완료"

0 commit comments

Comments
 (0)