build(deps): bump docker/github-builder-experimental/.github/workflows/bake.yml from 7643588149117bf0ca3a906caa3968c70484027a to c767551a26459c30e1f683df73a12fdb918f7068 #300
Workflow file for this run
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: e2e | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - 'master' | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| env: | |
| BUILDX_VERSION: latest | |
| BUILDKIT_IMAGE: moby/buildkit:latest | |
| IMAGE_LOCAL: localhost:5000/buildkit-syft-scanner:latest | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.examples.outputs.matrix }} | |
| steps: | |
| - | |
| name: Checkout | |
| uses: actions/checkout@v6 | |
| - | |
| name: Create matrix | |
| id: examples | |
| run: | | |
| examples=$(jq -ncR '[inputs]' <<< "$(ls -A ./examples/)") | |
| echo "matrix=$examples" >> $GITHUB_OUTPUT | |
| - | |
| name: Show matrix | |
| run: | | |
| echo ${{ steps.examples.outputs.matrix }} | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - prepare | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| example: ${{ fromJson(needs.prepare.outputs.matrix) }} | |
| services: | |
| registry: | |
| image: registry:2 | |
| ports: | |
| - 5000:5000 | |
| steps: | |
| - | |
| name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25" | |
| - | |
| name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| version: ${{ env.BUILDX_VERSION }} | |
| driver-opts: | | |
| network=host | |
| image=${{ env.BUILDKIT_IMAGE }} | |
| - | |
| name: Build and push Syft Scanner image | |
| uses: docker/bake-action@v6 | |
| with: | |
| source: . | |
| targets: image-local | |
| push: true | |
| - | |
| name: Test | |
| run: | | |
| ./hack/check-example.sh ${{ env.IMAGE_LOCAL }} ${{ matrix.example }} | |
| - | |
| name: Check output folder | |
| run: | | |
| tree ./examples/${{ matrix.example }}/build | |
| - | |
| name: Print SBOM | |
| if: matrix.example != 'scratch' | |
| run: | | |
| jq . ./examples/${{ matrix.example }}/build/sbom-base.spdx.json | |
| - | |
| name: Upload output folder | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: e2e-${{ matrix.example }} | |
| path: ./examples/${{ matrix.example }}/build/* | |
| if-no-files-found: error |