diff --git a/.github/workflows/build-and-push.yaml b/.github/workflows/build-and-push.yaml index c44289c..ff5143a 100644 --- a/.github/workflows/build-and-push.yaml +++ b/.github/workflows/build-and-push.yaml @@ -57,6 +57,8 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + build-args: | + TOOLS_CACHEBUST=${{ github.run_id }} cache-from: type=gha cache-to: type=gha,mode=max platforms: linux/amd64 diff --git a/.github/workflows/release-unified.yaml b/.github/workflows/release-unified.yaml index 0a4552c..e1bdecb 100644 --- a/.github/workflows/release-unified.yaml +++ b/.github/workflows/release-unified.yaml @@ -100,6 +100,8 @@ jobs: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.tag }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + build-args: | + TOOLS_CACHEBUST=${{ github.run_id }} cache-from: type=gha cache-to: type=gha,mode=max platforms: linux/amd64 diff --git a/Dockerfile b/Dockerfile index 9a149e6..2b32444 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,11 +64,17 @@ RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \ # Install Happy Coder globally via npm RUN npm install -g happy-coder +# Cache-bust: tools below fetch "latest" at build time — a changing ARG +# forces Docker to re-run these layers instead of serving stale cache. +ARG TOOLS_CACHEBUST=0 + # Install Claude Code via native installer (no Node.js dependency) RUN CLAUDE_VERSION=$(curl -fsSL https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest) && \ + echo "Installing Claude Code ${CLAUDE_VERSION}" && \ curl -fsSL "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/${CLAUDE_VERSION}/linux-x64/claude" \ -o /usr/local/bin/claude && \ - chmod +x /usr/local/bin/claude + chmod +x /usr/local/bin/claude && \ + claude --version # Install OpenCode AI coding agent RUN OPENCODE_VERSION=$(curl -sL https://api.github.com/repos/opencode-ai/opencode/releases/latest | jq -r '.tag_name') && \