Skip to content

Commit

Permalink
feat: Docker image tag versioning 추가, github application version up 이…
Browse files Browse the repository at this point in the history
…벤트 추가
  • Loading branch information
kumsil1006 committed Nov 23, 2022
1 parent d508fec commit 312a0fc
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/CLIENT_BUILD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: release-client CI/CD
on:
push:
branches:
- release
- 42-env-docker-및-remote-server-설정
paths:
- "client/**"

Expand Down Expand Up @@ -41,11 +41,17 @@ jobs:
username: kumsil1006
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

- name: Github Release 최신 tag 받아오기
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Docker images build 및 GitHub Container Registry로 push
uses: docker/[email protected]
with:
push: true
tags: ghcr.io/kumsil1006/oao-client
tags: ghcr.io/kumsil1006/oao-client:${{ steps.tag_version.outputs.previous_tag }},ghcr.io/kumsil1006/oao-client:latest
context: ./client

- name: Docker Compose 파일 운영 서버로 복사
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/PRODUCTION_RELEASE.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release Github Application Version
on:
pull_reaquest:
branches:
- main

- name: Github Release 최신 tag 받아오기
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: GitHub project release 업데이트
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
8 changes: 7 additions & 1 deletion .github/workflows/SERVER_BUILD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,18 @@ jobs:
username: kumsil1006
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

- name: Github Release 최신 tag 받아오기
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker images
uses: docker/[email protected]
with:
context: ./server
push: true
tags: ghcr.io/kumsil1006/oao-server
tags: ghcr.io/kumsil1006/oao-server:${{ steps.tag_version.outputs.previous_tag }},ghcr.io/kumsil1006/oao-server:latest

- name: Copy Docker Compose into the Server
uses: appleboy/scp-action@master
Expand Down

0 comments on commit 312a0fc

Please sign in to comment.