diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0fdb6ea..e406369 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,6 +14,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + # Extract the version (v*.*.*) from the branch name + - name: Extract version + id: extract_version + run: echo "VERSION=${GITHUB_REF_NAME##*/}" >> $GITHUB_ENV + # Log in to GitHub Container Registry - name: Log in to GHCR uses: docker/login-action@v2 @@ -29,5 +34,5 @@ jobs: context: . push: true tags: | - ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:${{ github.ref_name }} + ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:${{ env.VERSION }} ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:latest