Skip to content

ci: rework actions configuration and pre-commit hooks #1

ci: rework actions configuration and pre-commit hooks

ci: rework actions configuration and pre-commit hooks #1

Workflow file for this run

# This workflow builds a multi-arch Docker image using GitHub Actions and separated Github Runners
# with native support for ARM64 and AMD64 architectures, without using QEMU emulation.
name: CD Build and publish multi arch Docker Image
permissions: {}
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
push:
branches:
- "main"
tags:
- "v*"
pull_request:
env:
# The name of the Docker image to be built and pushed to GHCR
GHCR_IMAGE: ghcr.io/${{ github.repository }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
uses: docker/github-builder/.github/workflows/build.yml@7d2a02426d4b989616ba5aaee4e879afd4134b0d # v1.6.0
permissions:
contents: read # to fetch the repository content
id-token: write # for signing attestation(s) with GitHub OIDC Token
packages: write # to push the built image to GitHub Container Registry
with:
output: image
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
build-args: |
VERSION={{ meta.version }}
cache: true
cache-scope: pyomnilogic-local-docker-cache
meta-images: ghcr.io/cryptk/python-omnilogic-local
meta-tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
secrets:
registry-auths: |
- registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}