From fdf2ada97e27b73f15ddcd2eb129d7702462b2dc Mon Sep 17 00:00:00 2001 From: An Phan Date: Fri, 6 Mar 2026 12:37:04 +0700 Subject: [PATCH] derive Docker Hub tag from git tag Instead of hardcoding the version in the release workflow, derive it from the git tag that triggered the workflow. This eliminates one manual step when releasing a new version. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 581216d..82a5dd8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,9 +39,13 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_PASSWORD }} + - name: Get version from tag + id: version + run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" + - name: Build and push the production image uses: docker/build-push-action@v3.2.0 with: push: true - tags: phanan/koel:latest,phanan/koel:8.3.0 + tags: phanan/koel:latest,phanan/koel:${{ steps.version.outputs.VERSION }} platforms: linux/amd64,linux/arm64,linux/arm/v7