oci-images/.woodpecker/publish.yaml
Fritz Grimpen e83efcded0
All checks were successful
ci/woodpecker/tag/publish Pipeline was successful
Use rootless build
2025-04-15 18:42:01 +02:00

40 lines
1.4 KiB
YAML

when:
- event: [tag, cron, deployment]
steps:
- name: build
image: quay.io/buildah/stable
commands:
- rm /home/build/.config/containers/storage.conf
- buildah build --manifest dev.ccchb.de/ccchb/oci-images/$${CI_COMMIT_TAG%/*} $${CI_COMMIT_TAG%/*}/
- buildah manifest push --all dev.ccchb.de/ccchb/oci-images/$${CI_COMMIT_TAG%/*} oci-archive:/woodpecker/image.tar
backend_options:
kubernetes:
securityContext:
runAsUser: 1000
annotations:
io.kubernetes.cri-o.Devices: /dev/fuse
labels:
app.kubernetes.io/name: builder
- name: push_latest
image: quay.io/skopeo/stable
when:
- event: cron
cron: weekly_latest
- event: tag
commands:
- "skopeo copy --dest-creds ccchb:$${FORGEJO_API_TOKEN} oci-archive:/woodpecker/image.tar docker://dev.ccchb.de/ccchb/oci-images/$${CI_COMMIT_TAG%/*}:latest"
environment:
FORGEJO_API_TOKEN:
from_secret: FORGEJO_API_TOKEN
- name: push_tag
image: quay.io/skopeo/stable
when:
- event: cron
cron: weekly_latest
- event: tag
commands:
- "skopeo copy --dest-creds ccchb:$${FORGEJO_API_TOKEN} oci-archive:/woodpecker/image.tar docker://dev.ccchb.de/ccchb/oci-images/$${CI_COMMIT_TAG%/*}:$${CI_COMMIT_TAG##*/}"
environment:
FORGEJO_API_TOKEN:
from_secret: FORGEJO_API_TOKEN