bluebuild #81
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: bluebuild | |
| on: | |
| schedule: | |
| - cron: | |
| "00 06 * * *" | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - "**.md" | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| bluebuild: | |
| name: Build Custom Image | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| recipe: | |
| - recipe.yml | |
| steps: | |
| - name: Build Custom Image | |
| uses: blue-build/github-action@24d146df25adc2cf579e918efe2d9bff6adea408 # v1.11.1 | |
| with: | |
| recipe: ${{ matrix.recipe }} | |
| cosign_private_key: ${{ secrets.SIGNING_SECRET }} | |
| registry_token: ${{ github.token }} | |
| pr_event_number: ${{ github.event.number }} | |
| maximize_build_space: true | |
| - name: Generate SBOM | |
| if: github.event_name != 'pull_request' | |
| uses: anchore/sbom-action@17ae1740179002c89186b61233e0f892c3118b11 # v0.23.0 | |
| with: | |
| image: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }} | |
| format: cyclonedx-json | |
| output-file: sbom.cdx.json | |
| - name: Attest SBOM | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| cosign attest --type cyclonedx \ | |
| --predicate sbom.cdx.json \ | |
| --key env://COSIGN_PRIVATE_KEY \ | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }} | |
| env: | |
| COSIGN_PRIVATE_KEY: ${{ secrets.SIGNING_SECRET }} |