69 lines
2.3 KiB
YAML
69 lines
2.3 KiB
YAML
when:
|
|
- branch: buildah
|
|
event: push
|
|
|
|
steps:
|
|
build-image:
|
|
image: quay.io/buildah/stable:latest
|
|
pull: true
|
|
privileged: true
|
|
commands:
|
|
- echo $REGISTRY_PASSWORD | buildah --storage-driver vfs login -u $REGISTRY_USER --password-stdin registry.coolify1.workaround.org
|
|
|
|
- buildah --storage-driver vfs \
|
|
build --layers \
|
|
--cache-to registry.coolify1.workaround.org/debshots:cache \
|
|
--cache-from registry.coolify1.workaround.org/debshots:cache \
|
|
--tag registry.coolify1.workaround.org/debshots:stage \
|
|
.
|
|
|
|
- buildah --storage-driver vfs push registry.coolify1.workaround.org/debshots:stage
|
|
environment:
|
|
REGISTRY_USER:
|
|
from_secret: REGISTRY_USER
|
|
REGISTRY_PASSWORD:
|
|
from_secret: REGISTRY_PASSWORD
|
|
|
|
# build-docker-image:
|
|
# name: build-image
|
|
# when:
|
|
# - event: push
|
|
# # This plugin handles the DinD complexity for you
|
|
# image: woodpeckerci/plugin-docker-buildx
|
|
# privileged: true # Required for the plugin to start its internal Docker engine
|
|
# settings:
|
|
# registry: registry.coolify1.workaround.org
|
|
# repo: registry.coolify1.workaround.org/debshots
|
|
# driver: docker
|
|
# cache_from: 'type=registry\\,ref=registry.coolify1.workaround.org/debshots:buildcache'
|
|
# cache_to: 'type=registry\\,ref=registry.coolify1.workaround.org/debshots:buildcache,mode=max'
|
|
# dockerfile: Dockerfile
|
|
# username:
|
|
# from_secret: REGISTRY_USER
|
|
# password:
|
|
# from_secret: REGISTRY_PASSWORD
|
|
# tags:
|
|
# - latest
|
|
# - ${CI_COMMIT_SHA:0:7}
|
|
# # tell the Dockerfile about the commit SHA and build date
|
|
# build_args:
|
|
# COMMIT_SHA: ${CI_COMMIT_SHA:0:7}
|
|
# COMMIT_MESSAGE: ${CI_COMMIT_MESSAGE}
|
|
|
|
deploy-to-stage:
|
|
image: curlimages/curl:latest
|
|
when:
|
|
- event: push
|
|
- event: manual
|
|
environment:
|
|
# Key: The name in your script ($COOLIFY_STAGE_DEPLOY_TOKEN)
|
|
# Value: The name of the secret in Woodpecker's UI
|
|
COOLIFY_STAGE_DEPLOY_TOKEN:
|
|
from_secret: COOLIFY_STAGE_DEPLOY_TOKEN
|
|
COOLIFY_STAGE_DEPLOY_WEBHOOK:
|
|
from_secret: COOLIFY_STAGE_DEPLOY_WEBHOOK
|
|
commands:
|
|
- |
|
|
curl -H "Authorization: Bearer $$COOLIFY_STAGE_DEPLOY_TOKEN" \
|
|
-X POST \
|
|
"$$COOLIFY_STAGE_DEPLOY_WEBHOOK"
|