Skip to content

Commit

Permalink
feat: docker image versioning added
Browse files Browse the repository at this point in the history
  • Loading branch information
puleugo committed Jan 13, 2024
1 parent a2bc146 commit 0dafd5e
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

env:
REPO: inje-megabrain/megabrain.kr

jobs:
build:
name: Build
Expand Down Expand Up @@ -50,18 +53,28 @@ 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:
context: .
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/[email protected]
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
Expand Down

0 comments on commit 0dafd5e

Please sign in to comment.