fix: reduce data dump to only include app specific relations #68
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: Build and Push Docker image | |
| on: | |
| release: | |
| types: [published] | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: write | |
| packages: write | |
| attestations: write | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: prepare docker metadata | |
| uses: docker/metadata-action@v5 | |
| id: meta | |
| with: | |
| images: | | |
| ghcr.io/${{ github.repository }} | |
| tags: | | |
| type=sha | |
| type=ref,event=tag | |
| type=semver,pattern={{version}} | |
| - name: Build and push image | |
| id: push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile-prod | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| - name: Get first tag | |
| id: firsttag | |
| uses: actions/github-script@v8 | |
| env: | |
| ALLTAGS: ${{ steps.meta.outputs.tags }} | |
| with: | |
| script: | | |
| const firsttag = process.env.ALLTAGS.split('\n')[0] | |
| core.setOutput('firsttag', firsttag) | |
| - name: Generate SBOM | |
| uses: anchore/sbom-action@v0 | |
| with: | |
| image: ${{ steps.firsttag.outputs.firsttag }} | |
| format: 'cyclonedx-json' | |
| output-file: 'sbom.cyclonedx.json' | |
| - name: Attest | |
| uses: actions/attest-sbom@v3 | |
| id: attest | |
| with: | |
| subject-name: ghcr.io/${{ github.repository }} | |
| subject-digest: ${{ steps.push.outputs.digest }} | |
| sbom-path: 'sbom.cyclonedx.json' |