Repository navigation
Build claude-code #163
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" | |
| - "claude-code/.devcontainer/*.sh" | |
| - "claude-code/.devcontainer/managed-settings.json" | |
| schedule: | |
| - cron: '13 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/devcontainers/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/devcontainers/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 && rtk --version && ralphex --version && test -x /usr/local/bin/patch-playwright-mcp && test -r /etc/claude-code/managed-settings.json && jq -r '.hooks.SessionStart[0].hooks[0].command' /etc/claude-code/managed-settings.json | grep -qx /usr/local/bin/patch-playwright-mcp && printenv AGENT_BROWSER_EXECUTABLE_PATH | grep -qx /usr/bin/chromium" | |
| runner: ubuntu-24.04 | |
| arch: amd64 | |
| - image-suffix: claude-code | |
| verify-command: "bun --version || true && claude --version && mise --version && fish --version && rtk --version && ralphex --version && test -x /usr/local/bin/patch-playwright-mcp && test -r /etc/claude-code/managed-settings.json && jq -r '.hooks.SessionStart[0].hooks[0].command' /etc/claude-code/managed-settings.json | grep -qx /usr/local/bin/patch-playwright-mcp && printenv AGENT_BROWSER_EXECUTABLE_PATH | grep -qx /usr/bin/chromium" | |
| runner: ubuntu-24.04-arm | |
| arch: arm64 | |
| - image-suffix: claude-code-sandbox | |
| verify-command: "claude --version && mise --version && fish --version && which iptables && rtk --version && ralphex --version && test -x /usr/local/bin/patch-playwright-mcp && test -r /etc/claude-code/managed-settings.json && jq -r '.hooks.SessionStart[0].hooks[0].command' /etc/claude-code/managed-settings.json | grep -qx /usr/local/bin/patch-playwright-mcp" | |
| runner: ubuntu-24.04 | |
| arch: amd64 | |
| - image-suffix: claude-code-sandbox | |
| verify-command: "claude --version && mise --version && fish --version && which iptables && rtk --version && ralphex --version && test -x /usr/local/bin/patch-playwright-mcp && test -r /etc/claude-code/managed-settings.json && jq -r '.hooks.SessionStart[0].hooks[0].command' /etc/claude-code/managed-settings.json | grep -qx /usr/local/bin/patch-playwright-mcp" | |
| 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/devcontainers/${{ matrix.image-suffix }}:latest | |
| docker run --rm ghcr.io/gatezh/devcontainers/${{ matrix.image-suffix }}:latest bash -c "${{ matrix.verify-command }}" |