testing
Some checks failed
ci/woodpecker/push/regen-update-pipeline Pipeline failed

This commit is contained in:
2025-09-20 22:48:58 -04:00
parent fb3ccb426a
commit af35a78f7e
5 changed files with 84 additions and 22 deletions

32
generate_pipeline.py Normal file
View File

@@ -0,0 +1,32 @@
import json
from jinja2 import Template
with open("backup_manifest.json") as f:
manifest = json.load(f)
template_str = """
kind: pipeline
type: docker
name: backup
steps:
{% for backup in backups %}
- name: backup_{{ backup.name }}
image: alpine:3
volumes:
- {{ backup.path }}:/mnt/{{ backup.name }}
commands:
- echo "Backing up {{ backup.path }}"
- tar czf /tmp/{{ backup.name }}.tar.gz /mnt/{{ backup.name }}
# Replace with your actual upload/rsync/rclone command
- echo "Upload {{ backup.name }}.tar.gz to remote"
{% endfor %}
"""
template = Template(template_str)
output = template.render(backups=manifest["backups"])
with open(".woodpecker.yml", "w") as f:
f.write(output)
print("Generated .woodpecker.yml with inline volumes")