2023-03-08 23:51:37 -05:00
|
|
|
name: Update json and markdown
|
|
|
|
|
2024-01-17 10:34:06 -05:00
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
2023-03-08 23:51:37 -05:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- "instances.txt"
|
|
|
|
branches:
|
2024-01-17 10:34:06 -05:00
|
|
|
- main
|
2023-03-08 23:51:37 -05:00
|
|
|
workflow_dispatch: # run on manual trigger
|
2023-05-31 20:31:00 -04:00
|
|
|
schedule: [{cron: "0 0 */2 * *"}] # Run every other day
|
2023-03-08 23:51:37 -05:00
|
|
|
|
|
|
|
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
|