Repository navigation
perf(docker): optimize builds with cache mounts and parallel stages (… #6
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 devcontainer-claude-bun | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'devcontainer-claude-bun/.devcontainer/Dockerfile' | |
| - 'devcontainer-claude-bun/.devcontainer/init-firewall.sh' | |
| workflow_dispatch: | |
| concurrency: | |
| group: build-devcontainer-claude-bun-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version-tag: ${{ steps.versions.outputs.version-tag }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Extract versions from Dockerfile | |
| id: versions | |
| run: | | |
| DOCKERFILE="devcontainer-claude-bun/.devcontainer/Dockerfile" | |
| BUN_VERSION=$(grep '^ARG BUN_VERSION=' "$DOCKERFILE" | cut -d'=' -f2) | |
| echo "version-tag=bun${BUN_VERSION}-slim" >> "$GITHUB_OUTPUT" | |
| echo "Bun: $BUN_VERSION" | |
| build: | |
| needs: prepare | |
| permissions: | |
| contents: read | |
| packages: write | |
| uses: ./.github/workflows/reusable-docker-build.yml | |
| with: | |
| image-name: devcontainer-claude-bun | |
| context: devcontainer-claude-bun/.devcontainer | |
| dockerfile: devcontainer-claude-bun/.devcontainer/Dockerfile | |
| version-tag: ${{ needs.prepare.outputs.version-tag }} | |
| verify-command: 'bun --version' | |
| secrets: inherit |