Skip to content

fix: 토큰 만료 핸들 #28

fix: 토큰 만료 핸들

fix: 토큰 만료 핸들 #28

Workflow file for this run

# .github/workflows/frontend-ci.yml
name: Frontend CI
on:
push:
branches:
- panel-UI
env:
NCP_REGISTRY: blockcloud.kr.ncr.ntruss.com
NCR_REPO: blockcloud
APP_NAME: frontend-app
IMAGE_TAG: ${{ github.sha }}
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: 1. 소스 코드 Checkout
uses: actions/checkout@v4
- name: 2. Docker Buildx 설정
uses: docker/setup-buildx-action@v3
- name: 3. NCR (Container Registry) 로그인
uses: docker/login-action@v3
with:
registry: ${{ env.NCP_REGISTRY }}
username: ${{ secrets.NCP_ACCESS_KEY }}
password: ${{ secrets.NCP_SECRET_KEY }}
- name: 4. Docker 이미지 빌드 및 푸시
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: true
tags: ${{ env.NCP_REGISTRY }}/${{ env.NCR_REPO }}/${{ env.APP_NAME }}:${{ env.IMAGE_TAG }}
- name: 5. YAML 수정 도구(yq) 설치 (Go 버전)
run: |
# 🚨 yq 구버전 문제를 해결하기 위해 Go 버전 yq를 직접 설치
YQ_VERSION="v4.40.5" # 안정 버전 사용
wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 -O /usr/local/bin/yq
chmod +x /usr/local/bin/yq
- name: 6. Deployment YAML 파일 태그 업데이트 및 커밋
env:
YAML_FILE: front-deployment.yaml
MANIFEST_REPO_URL: https://github.com/BlockCloud-dev/blockcloud-manifest
NEW_TAG: ${{ env.NCP_REGISTRY }}/${{ env.NCR_REPO }}/${{ env.APP_NAME }}:${{ env.IMAGE_TAG }}
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git clone $MANIFEST_REPO_URL manifest-repo
cd manifest-repo
export NEW_TAG=$NEW_TAG
yq e '.spec.template.spec.containers[0].image = env(NEW_TAG)' -i $YAML_FILE
git add $YAML_FILE
git commit -m "CD: Update front-end image to ${{ env.IMAGE_TAG }}" || echo "No changes to commit"
git push https://${{ github.actor }}:${{ secrets.MANIFEST_REPO_PAT }}@github.com/BlockCloud-dev/blockcloud-manifest.git