mirror of
https://github.com/redlib-org/redlib-instances.git
synced 2024-11-13 18:06:15 -05:00
33 lines
834 B
YAML
33 lines
834 B
YAML
name: Update json and markdown
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- "instances.txt"
|
|
branches:
|
|
- main
|
|
workflow_dispatch: # run on manual trigger
|
|
schedule: [{cron: "0 0 */2 * *"}] # Run every other day
|
|
|
|
jobs:
|
|
update:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout the repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Generate instances
|
|
run: |
|
|
./generate-instances-json.sh -e -i ./instances.txt -I ./instances.json -o ./instances.json
|
|
./generate-instances-markdown.py --output=./instances.md ./instances.json
|
|
- name: Commit updated files back to the repository
|
|
run: |
|
|
git config user.name github-actions
|
|
git config user.email github-actions@github.com
|
|
git commit -am "[update] Update instances"
|
|
git push
|