Update next-koma.json #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Update next-koma.json" | |
on: | |
schedule: | |
- cron: '0 8,20 * * *' | |
workflow_dispatch: {} | |
jobs: | |
update-next-koma: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: tibdex/github-app-token@v1 | |
id: generate-token | |
with: | |
app_id: ${{ secrets.APP_ID }} | |
private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
- name: Download raw json from the wiki | |
run: curl -o next-koma-raw.json --globoff "https://de.komapedia.org/api.php?origin=*&action=ask&format=json&query=[[Category:KoMa]][[ende::%3E$(date -I)]]|sort=KoMaNr|order=asc|limit=5|?Ort|?Beginn|?Ende" | |
- name: Preprocess json results | |
run: | | |
jq .query.results <next-koma-raw.json >next-koma.json | |
rm next-koma-raw.json | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
commit-message: Sync next-koma.json from wiki | |
branch: update-next-koma-json | |
delete-branch: true | |
title: 'Update next-koma.json' | |
body: | | |
This is an automatically created PR. | |
The contents of `next-koma.json` was taken from the wiki. | |
labels: | | |
automated pr |