Repository navigation
Merge pull request #44 from gatezh/claude-code-latest #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build claude-code | |
| on: | |
| push: | |
| branches: [master] | |
| paths: | |
| - "claude-code/.devcontainer/Dockerfile" | |
| schedule: | |
| - cron: '0 11 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| concurrency: | |
| group: build-claude-code-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-default: | |
| uses: docker/github-builder/.github/workflows/build.yml@v1 | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| with: | |
| output: image | |
| push: true | |
| target: default | |
| context: claude-code/.devcontainer | |
| platforms: linux/amd64,linux/arm64 | |
| meta-images: ghcr.io/gatezh/devcontainer-images/claude-code | |
| meta-tags: | | |
| type=raw,value=latest | |
| type=sha,prefix= | |
| type=raw,value={{date 'YYYYMMDD'}} | |
| secrets: | |
| registry-auths: | | |
| - registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| build-sandbox: | |
| uses: docker/github-builder/.github/workflows/build.yml@v1 | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| with: | |
| output: image | |
| push: true | |
| target: sandbox | |
| context: claude-code/.devcontainer | |
| platforms: linux/amd64,linux/arm64 | |
| meta-images: ghcr.io/gatezh/devcontainer-images/claude-code-sandbox | |
| meta-tags: | | |
| type=raw,value=latest | |
| type=sha,prefix= | |
| type=raw,value={{date 'YYYYMMDD'}} | |
| secrets: | |
| registry-auths: | | |
| - registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| verify: | |
| name: Verify ${{ matrix.image-suffix }} (${{ matrix.arch }}) | |
| needs: [build-default, build-sandbox] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - image-suffix: claude-code | |
| verify-command: "bun --version || true && claude --version && mise --version && fish --version" | |
| runner: ubuntu-24.04 | |
| arch: amd64 | |
| - image-suffix: claude-code | |
| verify-command: "bun --version || true && claude --version && mise --version && fish --version" | |
| runner: ubuntu-24.04-arm | |
| arch: arm64 | |
| - image-suffix: claude-code-sandbox | |
| verify-command: "claude --version && mise --version && fish --version && which iptables" | |
| runner: ubuntu-24.04 | |
| arch: amd64 | |
| - image-suffix: claude-code-sandbox | |
| verify-command: "claude --version && mise --version && fish --version && which iptables" | |
| runner: ubuntu-24.04-arm | |
| arch: arm64 | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Verify image | |
| run: | | |
| docker pull ghcr.io/gatezh/devcontainer-images/${{ matrix.image-suffix }}:latest | |
| docker run --rm ghcr.io/gatezh/devcontainer-images/${{ matrix.image-suffix }}:latest bash -c "${{ matrix.verify-command }}" |