chore(deps): update php docker tag to v8.5.1 (#140) #237
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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "**" | |
| workflow_dispatch: | |
| workflow_call: | |
| permissions: | |
| contents: write | |
| packages: write | |
| actions: read | |
| security-events: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| php-tags: ${{ steps.meta-php.outputs.json }} | |
| nginx-tags: ${{ steps.meta-nginx.outputs.json }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: docker/setup-buildx-action@v3 | |
| - uses: docker/metadata-action@v5 | |
| id: meta-php | |
| with: | |
| bake-target: php | |
| images: | | |
| ghcr.io/${{ github.repository }}-php | |
| tags: | | |
| type=ref,event=branch | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| - uses: docker/metadata-action@v5 | |
| id: meta-nginx | |
| with: | |
| bake-target: nginx | |
| images: | | |
| ghcr.io/${{ github.repository }}-nginx | |
| tags: | | |
| type=ref,event=branch | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ github.token }} | |
| - uses: docker/bake-action@v6 | |
| with: | |
| targets: production | |
| files: | | |
| ./docker-bake.hcl | |
| cwd://${{ steps.meta-php.outputs.bake-file }} | |
| cwd://${{ steps.meta-nginx.outputs.bake-file }} | |
| sbom: true | |
| provenance: true | |
| push: true | |
| sbom: | |
| name: Generate SBOM | |
| runs-on: ubuntu-24.04 | |
| needs: build | |
| strategy: | |
| matrix: | |
| include: | |
| - name: php | |
| image-ref: ${{ fromJson(needs.build.outputs.php-tags).tags[0] }} | |
| - name: nginx | |
| image-ref: ${{ fromJson(needs.build.outputs.nginx-tags).tags[0] }} | |
| steps: | |
| - name: Update Dependency Graph | |
| uses: aquasecurity/trivy-action@0.33.1 | |
| with: | |
| image-ref: ${{ matrix.image-ref }} | |
| format: 'github' | |
| output: '${{ matrix.name }}.sbom.json' | |
| github-pat: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Generate Sarif Report | |
| uses: aquasecurity/trivy-action@0.33.1 | |
| with: | |
| image-ref: ${{ matrix.image-ref }} | |
| format: sarif | |
| output: ${{ matrix.name }}.sarif | |
| - name: Upload Sarif Report | |
| uses: github/codeql-action/upload-sarif@v4 | |
| with: | |
| sarif_file: ${{ matrix.name }}.sarif | |
| category: ${{ matrix.name }} | |
| - name: Generate SBOM | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: aquasecurity/trivy-action@0.33.1 | |
| with: | |
| image-ref: ${{ matrix.image-ref }} | |
| format: cyclonedx | |
| output: ${{ matrix.name }}.cdx.json | |
| - name: Attach SBOM Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh release --repo ${{ github.repository }} upload ${{ github.ref_name }} ${{ matrix.name }}.cdx.json |