32 lines
867 B
YAML
32 lines
867 B
YAML
kind: pipeline
|
|
type: docker
|
|
name: regen-backup-pipeline
|
|
|
|
# Only run this pipeline when the manifest changes
|
|
# when:
|
|
# path:
|
|
# include:
|
|
# - backup-paths.json
|
|
|
|
when:
|
|
event:
|
|
include:
|
|
- push
|
|
|
|
steps:
|
|
- name: regenerate
|
|
image: python:3.12
|
|
environment:
|
|
GIT_USER_NAME: woodpecker-bot
|
|
GIT_USER_EMAIL: ci@git.jthor.site
|
|
GIT_AUTH_TOKEN:
|
|
from_secret: woodpecker-bot # store your Gitea PAT or deploy key in Woodpecker secrets
|
|
commands:
|
|
- pip install jinja2
|
|
- python generate_pipeline.py
|
|
- git config user.name "$GIT_USER_NAME"
|
|
- git config user.email "$GIT_USER_EMAIL"
|
|
- git add woodpecker/backup-pipeline.yml
|
|
- git diff --cached --quiet || git commit -m "Auto-regenerate pipeline [skip ci]"
|
|
- git push https://oauth2:$GIT_AUTH_TOKEN@git.jthor.site/jthor/ci.git HEAD:main
|