diff --git a/.github/workflows/CLIENT_BUILD.yml b/.github/workflows/CLIENT_BUILD.yml index a36d5bf..03b969d 100644 --- a/.github/workflows/CLIENT_BUILD.yml +++ b/.github/workflows/CLIENT_BUILD.yml @@ -2,7 +2,7 @@ name: release-client CI/CD on: push: branches: - - release + - 42-env-docker-및-remote-server-설정 paths: - "client/**" @@ -41,11 +41,17 @@ jobs: username: kumsil1006 password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + - name: Github Release 최신 tag 받아오기 + id: tag_version + uses: mathieudutour/github-tag-action@v6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Docker images build 및 GitHub Container Registry로 push uses: docker/build-push-action@v3.2.0 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 파일 운영 서버로 복사 diff --git a/.github/workflows/PRODUCTION_RELEASE.yml b/.github/workflows/PRODUCTION_RELEASE.yml new file mode 100644 index 0000000..388b5cd --- /dev/null +++ b/.github/workflows/PRODUCTION_RELEASE.yml @@ -0,0 +1,18 @@ +name: Release Github Application Version +on: + pull_reaquest: + branches: + - main + + - name: Github Release 최신 tag 받아오기 + id: tag_version + uses: mathieudutour/github-tag-action@v6.1 + 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 }} diff --git a/.github/workflows/SERVER_BUILD.yml b/.github/workflows/SERVER_BUILD.yml index ff2cd06..bb06ace 100644 --- a/.github/workflows/SERVER_BUILD.yml +++ b/.github/workflows/SERVER_BUILD.yml @@ -33,12 +33,18 @@ jobs: username: kumsil1006 password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + - name: Github Release 최신 tag 받아오기 + id: tag_version + uses: mathieudutour/github-tag-action@v6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push Docker images uses: docker/build-push-action@v3.2.0 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