fix: add nightly tag for main branch Docker builds

- 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 <noreply@anthropic.com>
This commit is contained in:
Jonathan
2025-05-29 12:53:47 -05:00
parent 9c8276b92f
commit 348dfa6544

View File

@@ -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