7e5c7ae326a783e59490239c26839fbf9a0f5d15
ci
Reusable Gitea Actions workflows for the apps in the cluster.
image.yaml
Builds and pushes one or more images with a uniform tag set from docker/metadata-action:
| Tag | When |
|---|---|
<UTC yyyymmddHHMMSS>-<sha7> |
every build; Flux ImagePolicy sorts on the timestamp |
1.2.3, 1.2, 1 |
on a v1.2.3 git tag (1 is skipped while the major is 0; pre-releases only get the full version) |
latest |
on the default branch |
The tag set is computed once per run, so every image of a multi-image repo gets the same tags.
jobs:
test: ...
image:
needs: test
uses: traberph/ci/.gitea/workflows/image.yaml@main
with:
images: '[{"image": "registry.traberph.de/private/cv"}]'
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
secrets:
registry-username: ${{ secrets.REGISTRY_USERNAME }}
registry-token: ${{ secrets.REGISTRY_TOKEN }}
Inputs:
images(required): JSON array of{"image", "context", "dockerfile"};contextdefaults to.,dockerfileto<context>/Dockerfile.registry: registry to log in to (defaultregistry.traberph.de).platforms: defaultlinux/amd64. QEMU is set up when anarmplatform is listed.build-args: newline-separatedKEY=value, passed to every image.push: defaulttrue.cache: keep the layer cache in the registry as<image>:buildcache(defaultfalse).
Outputs: tag (the timestamp tag), version, tag-names.
Updates
Renovate (running in the cluster, see cumulus/apps/base/renovate) opens PRs for the actions used here; see renovate.json.