diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd15904..2a180c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,9 @@ on: branches: - main +env: + REPO: inje-megabrain/megabrain.kr + jobs: build: name: Build @@ -50,6 +53,9 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GHCR_TOKEN }} + - name: Get Minor version variable in Repository variable + run: echo NEW_MINOR_VERSION=$[${{ vars.MINOR_VERSION }} + 1] >> $GITHUB_ENV + - name: Build Image and Push uses: docker/build-push-action@v2 with: @@ -57,11 +63,18 @@ jobs: push: true target: production platform: linux/amd64 - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + tags: ghcr.io/inje-megabrain/megabrain.kr:${{ vars.MINOR_VERSION }}.${{ env.NEW_MINOR_VERSION }} cache-from: type=gha cache-to: type=gha,mode=max + - name: Update Minor version + uses: hmanzur/actions-set-secret@v2.0.0 + with: + name: 'MINOR_VERSION' + value: ${{ env.NEW_MINOR_VERSION }} + repository: ${{ env.REPO }} + token: ${{ secrets.REPO_ACCESS_TOKEN }} + kubernetes-resource-update: name: Kubernetes resource update runs-on: ubuntu-latest