gitlin/.woodpecker/instancejson.yml
2023-02-11 09:17:42 +00:00

29 行
901 B
YAML

# Credit to Hygna (https://codeberg.org/Hygna)
pipeline:
instancejson:
image: python:3-bullseye
secrets: [ssh_key, mail]
when:
- event: cron
cron: instancejson
- path:
include: ["README.md", ".woodpecker/instancejson.yml"]
branch: dev
commands:
# SSH configuration
- mkdir ~/.ssh
- ssh-keyscan -t ed25519 codeberg.org >> ~/.ssh/known_hosts
- eval `ssh-agent`
- echo "$SSH_KEY" | tr -d '\r' | ssh-add -
# Running script
- git clone git@codeberg.org:gothub/gothub-instances.git instances
- cd instances
- pip install -r requirements.txt
- python3 main.py
# Git configuration
- git config --global user.email $MAIL
- git config --global user.name "Woodpecker CI"
- git add instances.json
- git commit -m "Updated instances"
- git push -u origin master