test-woodpecker-webapp/.woodpecker/build.yaml

43 lines
1.3 KiB
YAML
Raw Normal View History

2025-06-25 04:14:41 +02:00
when:
- event: manual
- event: tag
#depends_on:
#- test
steps:
npm:
2025-06-25 13:01:09 +02:00
image: code.philo.ydns.eu/philorg/pnpm
2025-06-25 04:14:41 +02:00
environment:
ORG: philorg
2025-06-25 04:26:19 +02:00
REGISTRY_TOKEN:
from_secret: registry_token
2025-06-25 04:14:41 +02:00
commands:
- pnpm install --frozen-lockfile
- pnpm set "//code.philo.ydns.eu/api/packages/$ORG/npm/:_authToken=$REGISTRY_TOKEN"
- pnpm publish --no-git-checks
2025-06-25 04:47:27 +02:00
failure: ignore
2025-06-25 04:33:41 +02:00
2025-06-26 11:12:24 +02:00
build_publish:
image: quay.io/podman/stable:latest
# Caution: This image is built daily. It might fill up your image store quickly.
2025-06-26 15:18:07 +02:00
#pull: true
2025-06-26 15:21:29 +02:00
volumes:
2025-06-26 15:24:00 +02:00
- containers:/var/lib/containers
2025-06-26 11:12:24 +02:00
# Fill in the trusted checkbox in Woodpecker's settings as well
privileged: true
environment:
2025-06-26 11:46:18 +02:00
registry: code.philo.ydns.eu
org: philorg
container_name: test-woodpecker-webapp
2025-06-26 11:12:24 +02:00
registry_token:
from_secret: registry_token
commands:
# Login at the registry
2025-06-26 11:46:18 +02:00
- podman login -u __token__ --password $registry_token $registry
2025-06-26 11:12:24 +02:00
# Build the container image
2025-06-26 14:30:31 +02:00
- podman build --volume=/var/lib/containers:/var/lib/containers --tag $registry/$org/$container_name:latest --tag $registry/$org/$container_name:$CI_COMMIT_TAG .
2025-06-26 11:12:24 +02:00
# Push the image
2025-06-26 11:48:08 +02:00
- podman push $registry/$org/$container_name:latest
2025-06-26 11:51:14 +02:00
- podman push $registry/$org/$container_name:$CI_COMMIT_TAG