ci: add docker workflow #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker build images | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: [main] | |
merge_group: | |
permissions: | |
contents: read | |
issues: read | |
packages: write | |
pull-requests: read | |
# FIXME: This is a workaround for having workflow actions. See https://github.com/orgs/community/discussions/38659 | |
id-token: write | |
jobs: | |
docker-build-images: | |
uses: hoverkraft-tech/ci-github-container/.github/workflows/[email protected] | |
secrets: | |
# Password or GitHub token (packages:read and packages:write scopes) used to log against the OCI registry. | |
# See https://github.com/docker/login-action#usage. | |
oci-registry-password: ${{ secrets.GITHUB_TOKEN }} | |
# Optional customizations. | |
with: | |
# Json array of runner(s) to use. | |
# See https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job | |
# Default: '["ubuntu-latest"]' | |
runs-on: '["ubuntu-24.04"]' | |
# OCI registry where to pull and push images. | |
oci-registry: "" | |
# Username used to log against the OCI registry. See https://github.com/docker/login-action#usage | |
# Default: "${{ github.repository_owner }}" | |
oci-registry-username: "" | |
# Images to build parameters. | |
# Example: [{ | |
# "name": "application", | |
# "dockerfile": "./docker/application/Dockerfile", | |
# "build-args": { "APP_PATH": "./application/", "PROD_MODE": "true" }, | |
# "target": "prod", | |
# "platforms": [ | |
# "linux/amd64", | |
# { | |
# "name": "darwin/amd64", | |
# "runs-on": "macos-latest" | |
# } | |
# ] | |
# }] | |
images: | | |
[{ | |
"name": "mailrelay", | |
"dockerfile": "./Dockerfile", | |
"build-args": {}, | |
"platforms": [ | |
"linux/amd64", | |
"linux/arm64" | |
] | |
}] |