1
0
Files
rngpotd/.woodpecker/.build.yml
2025-07-17 13:16:40 +03:00

69 lines
1.7 KiB
YAML

when:
- event: [ push, tag, cron, manual ]
evaluate: 'LATEST_TAG == ""'
variables:
- &image_name 'docker.io/rockdrilla/rngpotd'
- &buildah_image 'quay.io/containers/buildah:v1.40.1'
- &skopeo_image 'quay.io/containers/skopeo:v1.19.0'
- &go_image 'docker.io/library/golang:1.24.5-bookworm'
- &base_image 'gcr.io/distroless/static-debian12:nonroot'
## value list depends on base image
## ref: https://github.com/GoogleContainerTools/distroless#debian-12
- &target_platforms 'linux/amd64,linux/arm,linux/arm64,linux/ppc64le,linux/s390x'
## NB: ${variable} expressions are subject to pre-processing.
## ref: https://woodpecker-ci.org/docs/usage/environment
steps:
- name: verify-registry-credentials
image: *skopeo_image
environment:
GOMAXPROCS: "4"
MALLOC_ARENA_MAX: "4"
##
REGISTRY_AUTH:
from_secret: REGISTRY_AUTH
commands:
- .ci/registry-login.sh docker.io
- name: build-all
image: *go_image
environment:
GOMAXPROCS: "4"
MALLOC_ARENA_MAX: "4"
##
TARGET_PLATFORMS: *target_platforms
## these secrets are server-wide
commands:
- .ci/build-all.sh
- name: image-all
image: *buildah_image
privileged: true
environment:
GOMAXPROCS: "4"
MALLOC_ARENA_MAX: "4"
##
BUILDAH_FORMAT: "docker"
TARGET_PLATFORMS: *target_platforms
BASE_IMAGE: *base_image
IMAGE_NAME: *image_name
commands:
- .ci/image-all.sh
- name: image-sync
image: *skopeo_image
environment:
GOMAXPROCS: "4"
MALLOC_ARENA_MAX: "4"
##
IMAGE_NAME: *image_name
commands:
- .ci/sync-all.sh
## personal tweaks :)
labels:
network: dmz