azure/.woodpecker/build.yaml
Bastien Riviere f6fa6f372f
Some checks failed
build-ublue-custom / Build and push image (push) Waiting to run
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/cron/build Pipeline failed
chore: build with layers
2024-12-10 23:13:16 +01:00

25 lines
804 B
YAML

when:
- event: push
branch: main
- event: cron
cron: build_image
steps:
- name: build
image: quay.io/containers/buildah:v1.38.0
environment:
FEDORA_MAJOR_VERSION: latest
IMAGE_NAME: forge.babariviere.com/babariviere/azure
PACKAGE_TOKEN:
from_secret: package_token
privileged: true
commands:
- echo "$PACKAGE_TOKEN" | buildah login forge.babariviere.com --username babariviere --password-stdin
- >-
buildah build
--layers
--cache-from docker://$IMAGE_NAME/cache
--cache-to docker://$IMAGE_NAME/cache
--label org.opencontainers.image.source=https://$IMAGE_NAME
-t $IMAGE_NAME:latest -t $IMAGE_NAME:$(date -u +%Y%m%d) .
- buildah push --all $IMAGE_NAME docker://$IMAGE_NAME