From 17385574a376274f682702940ee6689a6ef37d8c Mon Sep 17 00:00:00 2001 From: Phoeniix Zhao Date: Mon, 5 Feb 2024 17:27:19 +0800 Subject: [PATCH] ci: add git tag Signed-off-by: Phoeniix Zhao --- .github/workflows/release.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4426a22..518cf01 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,9 +20,12 @@ jobs: uses: actions/checkout@v2 with: submodules: recursive + - name: Generate App Version + id: generate_app_version + run: echo app_version=`git describe --tags --always` >> $GITHUB_OUTPUT - name: Build xline operator image run: | - make docker-build IMG=${{ env.IMAGE_ID }}:${{ github.ref }} + make docker-build IMG=${{ env.IMAGE_ID }}:${{ steps.generate_app_version.outputs.app_version }} - name: Login to GHCR if: startsWith(matrix.job.platform, 'linux/') uses: docker/login-action@v2 @@ -32,7 +35,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Push docker image to GHCR run: | - make docker-push IMG=${{ env.IMAGE_ID }}:${{ github.ref }} + make docker-push IMG=${{ env.IMAGE_ID }}:${{ steps.generate_app_version.outputs.app_version }} - name: Create Release id: create_release uses: actions/create-release@v1