ci: fix docker caching by switching to buildx driver (#124) #8
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: Pre-build Dev Container | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - '.devcontainer/**' | |
| - 'Cargo.lock' | |
| - 'Cargo.toml' | |
| - 'rust-toolchain.toml' | |
| branches: [ "main" ] | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Pre-build and push | |
| uses: devcontainers/ci@v0.3 | |
| with: | |
| imageName: ghcr.io/${{ github.repository }}/devcontainer | |
| cacheFrom: ghcr.io/${{ github.repository }}/devcontainer | |
| cacheTo: ghcr.io/${{ github.repository }}/devcontainer | |
| push: filter | |
| refFilterForPush: refs/heads/main | |
| eventFilterForPush: push, workflow_dispatch |