From 66c187fbe0ba9234203db955bf20605126d906eb Mon Sep 17 00:00:00 2001 From: Joe Yates Date: Fri, 3 Nov 2023 09:01:56 +0100 Subject: [PATCH] Copy the latest project tag to the image --- .github/workflows/publish-image.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-image.yaml b/.github/workflows/publish-image.yaml index 831ddfae..2cafb7da 100644 --- a/.github/workflows/publish-image.yaml +++ b/.github/workflows/publish-image.yaml @@ -22,13 +22,17 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Get the latest tag + run: | + echo "GIT_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_ENV + - name: Build Image # https://github.com/marketplace/actions/buildah-build id: build-image uses: redhat-actions/buildah-build@v2 with: image: ${{ env.IMAGE_NAME }} - tags: latest ${{ github.sha }} + tags: latest ${{ github.sha }} ${{ env.GIT_TAG }} extra-args: | --ignorefile ./container/.containerignore containerfiles: |