Fetch App ID Lists #1890
This file contains hidden or 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: Fetch App ID Lists | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 */3 * * *' | |
| permissions: | |
| contents: write | |
| jobs: | |
| fetch-and-combine: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Fetch in parallel | |
| env: | |
| URL_1: ${{ secrets.URL_1 }} | |
| URL_2: ${{ secrets.URL_2 }} | |
| URL_3: ${{ secrets.URL_3 }} | |
| run: | | |
| curl -sf "$URL_1" -o dlc.json & | |
| curl -sf "$URL_2" -o games.json & | |
| curl -sf "$URL_3" -o software.json & | |
| wait | |
| - name: Combine with type tags | |
| run: | | |
| jq -sc \ | |
| '(.[0] | map(. + {type: "dlc"})) + | |
| (.[1] | map(. + {type: "game"})) + | |
| (.[2] | map(. + {type: "software"}))' \ | |
| dlc.json games.json software.json > AppIDList.json | |
| - name: Commit and push | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add AppIDList.json | |
| git diff --staged --quiet || git commit -m "Update AppIDList.json" | |
| git push |