From 348dfa6544277971ceb8fc9fe3ea687faa27b8e9 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 29 May 2025 12:53:47 -0500 Subject: [PATCH] fix: add nightly tag for main branch Docker builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add :nightly tag when pushing to main branch for both images - Keep :latest tag only for version tags (v*.*.*) - Add full semantic versioning support to claudecode image - Remove -staging suffix approach from claudecode image This fixes the "tag is needed when pushing to registry" error that occurs when pushing to main branch without any valid tags. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/docker-publish.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 33b17e8..a759871 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -51,7 +51,10 @@ jobs: type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} + # Latest tag for version tags type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }} + # Nightly tag for main branch pushes + type=raw,value=nightly,enable=${{ github.ref == 'refs/heads/main' }} - name: Build and push Docker image uses: docker/build-push-action@v6 @@ -106,9 +109,13 @@ jobs: with: images: ${{ env.DOCKER_HUB_ORGANIZATION }}/claudecode tags: | - type=ref,event=branch,suffix=-staging type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + # Latest tag for version tags type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }} + # Nightly tag for main branch pushes + type=raw,value=nightly,enable=${{ github.ref == 'refs/heads/main' }} - name: Build and push Claude Code Docker image uses: docker/build-push-action@v6