Repository navigation
TEST ONLY: analyze release matching (will be closed) #4
Workflow file for this run
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
| # TEST ONLY (throwaway): download the GitHub releases of the data/ entries | |
| # (direct AppImage links first, then repository URLs) for offline analysis | |
| name: Analyze releases | |
| on: pull_request | |
| jobs: | |
| analyze: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download | |
| run: | | |
| mkdir -p out/json | |
| list() { | |
| for f in data/* ; do | |
| u=$(head -n 1 "$f" | tr -d '\r') | |
| case "$u" in https://github.com/*/releases/download/*) [ "$1" == direct ] && printf '%s\t%s\n' "$(basename "$f")" "$u" ;; | |
| https://github.com/*) [ "$1" == repo ] && printf '%s\t%s\n' "$(basename "$f")" "$u" ;; esac | |
| done | |
| true | |
| } | |
| { list direct ; list repo ; } > out/list.tsv | |
| while IFS=$'\t' read -r name u ; do | |
| owner=$(echo "$u" | cut -d / -f 4) ; repo=$(echo "$u" | cut -d / -f 5) | |
| code=$(curl -sSL -o "out/json/$name.json" -w '%{http_code}' -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github+json" \ | |
| "https://api.github.com/repos/$owner/$repo/releases?per_page=30") || true | |
| if [ "$code" == 403 ] || [ "$code" == 429 ] ; then echo "Rate limited at $name" ; rm -f "out/json/$name.json" ; break ; fi | |
| done < out/list.tsv | |
| ls out/json | wc -l | |
| tar czf releases.tgz out | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: releases | |
| path: releases.tgz |