Skip to content

use buildx

use buildx #24

Workflow file for this run

name: Build OCI image
on: push
jobs:
Build:
runs-on: ubuntu-latest
env:
IMAGE: ghcr.io/${{ github.repository }}
permissions:
attestations: write
contents: read
id-token: write
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v5
id: meta
with:
images: ${{ env.IMAGE }}
- uses: docker/bake-action@v5
id: bake
with:
files: |
./docker-bake.hcl
${{ steps.meta.outputs.bake-file }}
sbom: true
push: true
- uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.IMAGE }}
subject-digest: ${{ steps.bake.outputs.metadata.provenance.digest }}
push-to-registry: true