package-cache/.woodpecker/docker.yml

33 lines
1.3 KiB
YAML

---
pipeline:
build-images:
image: quay.io/buildah/stable
privileged: true # Only needed when running under docker; on podman it can be dropped
environment:
- STORAGE_DRIVER=vfs
commands:
- buildah build --platform=linux/amd64,linux/arm64,linux/arm --manifest $CI_REPO_NAME -f Dockerfile .
- buildah login -u $CONTAINER_REPO_USERNAME -p $CONTAINER_REPO_PASSWORD git.worn.eu
- buildah manifest push --all $CI_REPO_NAME docker://git.worn.eu/$CI_REPO:git-$${CI_COMMIT_SHA::10}
- buildah manifest push --all $CI_REPO_NAME docker://git.worn.eu/$CI_REPO:ci-$CI_BUILD_NUMBER
- test "$CI_COMMIT_BRANCH" == "$CI_REPO_DEFAULT_BRANCH" && buildah manifest push --all $CI_REPO_NAME docker://git.worn.eu/$CI_REPO:latest
- echo Done
when:
event: push
secrets:
- container_repo_username
- container_repo_password
tag-images:
image: registry.access.redhat.com/ubi9/skopeo
commands:
- skopeo login -u $CONTAINER_REPO_USERNAME -p $CONTAINER_REPO_PASSWORD git.worn.eu
- skopeo copy -a docker://git.worn.eu/$CI_REPO:git-$${CI_COMMIT_SHA::10} docker://git.worn.eu/$CI_REPO:$${CI_COMMIT_TAG##v}
when:
event: tag
secrets:
- container_repo_username
- container_repo_password
depends_on:
- lint