Skip to content

chore(deps): update github/codeql-action action to v3.27.3 (#111) #269

chore(deps): update github/codeql-action action to v3.27.3 (#111)

chore(deps): update github/codeql-action action to v3.27.3 (#111) #269

Workflow file for this run

name: Build OCI Image
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
permissions:
contents: none
jobs:
build:
name: Build ${{ matrix.variant.name }} image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
attestations: write
strategy:
fail-fast: false
matrix:
variant:
- name: Alpine
tag: alpine
target: release-alpine
- name: Ubuntu
tag: ubuntu
target: release-ubuntu
steps:
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Login to GHCR
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
if: ${{ github.event_name != 'pull_request' }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
- name: Set up Docker Metadata
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with:
images: ghcr.io/${{ github.repository }}
flavor: |
latest=auto
prefix=${{ matrix.variant.tag }}-,onlatest=true
tags: |
type=edge
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and push
id: push
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
target: ${{ matrix.variant.target }}
push: ${{ github.event_name != 'pull_request' }}
cache-from: type=gha,scope=${{ matrix.variant.tag }}
cache-to: type=gha,mode=max,scope=${{ matrix.variant.tag }}
context: .
file: ${{ matrix.variant.dockerfile }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
- name: Attest
uses: actions/attest-build-provenance@ef244123eb79f2f7a7e75d99086184180e6d0018 # v1.4.4
with:
subject-name: ghcr.io/${{ github.repository }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
if: github.event_name != 'pull_request'