Skip to content

chore: release v0.1.4 #144

chore: release v0.1.4

chore: release v0.1.4 #144

Workflow file for this run

name: Build and push Docker image
on:
push:
branches: [main]
# release-plz tags releases as `imgx-vX.Y.Z` (package-prefixed, since
# imgx-vips is tagged separately in the same repo) -- not the bare
# `vX.Y.Z` this previously matched, which never fired.
tags: ["imgx-v*"]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
build:
# Docker-maintained reusable workflow: distributes the build across
# native per-platform runners (linux/arm64 -> ubuntu-24.04-arm by
# default) instead of QEMU emulation, which is what made aws-lc-sys
# (reqwest's rustls crypto backend, compiled via cmake) painfully slow
# to build for arm64. Also gives us signed SLSA provenance for free.
# https://github.com/docker/github-builder
uses: docker/github-builder/.github/workflows/build.yml@v1
permissions:
contents: read
packages: write
id-token: write
with:
output: image
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
meta-images: ghcr.io/${{ github.repository }}
meta-tags: |
type=ref,event=branch
type=match,pattern=imgx-v(.*),group=1
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/imgx-v') }}
type=sha
cache: true
cache-mode: max
secrets:
registry-auths: |
- registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
scan:
needs: build
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
security-events: write
steps:
- name: Log in to GHCR
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Scans by digest (from the build job's output), not a tag -- the
# exact multi-arch image that was just pushed, not whatever a
# mutable tag happens to point at by the time this job runs.
- name: Run Trivy vulnerability scan
uses: aquasecurity/trivy-action@v0.36.0
with:
image-ref: ghcr.io/${{ github.repository }}@${{ needs.build.outputs.digest }}
format: sarif
output: trivy-results.sarif
severity: CRITICAL,HIGH
- name: Upload scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v4
if: always()
with:
sarif_file: trivy-results.sarif