Skip to content

chore(deps): update docker.io/mlocati/php-extension-installer docker … #166

chore(deps): update docker.io/mlocati/php-extension-installer docker …

chore(deps): update docker.io/mlocati/php-extension-installer docker … #166

Workflow file for this run

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@v4
- 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.31.0
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.31.0
with:
image-ref: ${{ matrix.image-ref }}
format: sarif
output: ${{ matrix.name }}.sarif
- name: Upload Sarif Report
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ matrix.name }}.sarif
category: ${{ matrix.name }}
- name: Generate SBOM
if: startsWith(github.ref, 'refs/tags/')
uses: aquasecurity/trivy-action@0.31.0
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