[FIX] Member 테이블 중복 Row 삭제처리 (#132) #16
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
name: CD | |
on: | |
push: | |
branches: ["main", "develop"] | |
env: | |
dockerimage_tag: ${{ github.sha }} | |
dockerimage_name: jcy0308/stop | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
steps: | |
- name: --------------- Code Repo --------------- | |
run: echo "Code Repo" | |
- name: Code Repo 불러오기 | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'corretto' | |
- name: Set up Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Gradle 권한 부여 | |
run: chmod +x gradlew | |
- name: Gradle build | |
run: ./gradlew build --exclude-task test --exclude-task asciidoctor | |
- name: Docker 준비(1/4) - 메타데이터 생성 | |
id: meta | |
uses: docker/[email protected] | |
with: | |
images: | | |
${{ env.dockerimage_name }} | |
tags: | | |
${{ env.dockerimage_tag }} | |
latest | |
flavor: | | |
latest=true | |
- name: Docker 준비(2/4) - QEMU 설정 | |
uses: docker/setup-qemu-action@v3 | |
- name: Docker 준비(3/4) - buildx 설정 | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker 준비(4/4) - 레지스트리 로그인 | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCkER_PASSWORD }} | |
- name: Docker 이미지 빌드+푸시 | |
id: build-and-push | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64 | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
provenance: false | |
- name: --------------- Config Repo --------------- | |
run: echo "[Config Repo]" | |
- name: Config Repo 불러오기 | |
uses: actions/checkout@v4 | |
with: | |
repository: SystemConsultantGroup/S-TOP-config | |
ref: main | |
token: ${{ secrets.ACTION_TOKEN }} | |
path: S-TOP-config | |
- name: Kustomize 준비 | |
uses: imranismail/[email protected] | |
- name: Config Repo 이미지 값 업데이트 (Kustomize) | |
run: | | |
cd S-TOP-config/overlays/prod/be/ | |
kustomize edit set image ${{ env.dockerimage_name }}:${{ env.dockerimage_tag }} | |
cat kustomization.yaml | |
- name: Config Repo 변경사항 푸시 | |
run: | | |
cd S-TOP-config | |
git config --global user.email "[email protected]" | |
git config --global user.name "chanyeong" | |
git commit -am "Update image tag" | |
git push -u origin main | |
- name: --------------- Clean Up --------------- | |
run: echo "Clean Up" |