From 445cafe684b2467de45bb375878f2cdeddec470c Mon Sep 17 00:00:00 2001 From: Volker Date: Fri, 26 Dec 2025 23:02:55 +0100 Subject: [PATCH] add a git tag when updating main --- .github/workflows/docker-publish.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 808a3ba..938b5a4 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -13,6 +13,26 @@ env: IMAGE_NAME: ${{ github.repository }} jobs: + tag-release: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + needs: build-and-push-image + permissions: + contents: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Read version from file + id: version + run: echo "TAG=$(cat VERSION)" >> $GITHUB_OUTPUT + + - name: Create and push Git tag + run: | + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + git tag -a "${{ steps.version.outputs.TAG }}" -m "Release ${{ steps.version.outputs.TAG }}" + git push origin "${{ steps.version.outputs.TAG }}" build-and-push-image: runs-on: ubuntu-latest permissions: