File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 1616 fetch-depth : 0
1717 - name : Read api.github.com and filter response
1818 run : |
19+ set -euo pipefail
1920 cd common/mirror
20- export JQ_FILTER="[.[] | {tag_name: .tag_name, assets: [.assets[] | {browser_download_url: .browser_download_url} ] } ]"
21- curl -H "Authorization: ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/SeleniumHQ/selenium/releases | jq "$JQ_FILTER" > selenium
21+ TOKEN="${{ secrets.GITHUB_TOKEN }}"
22+ JQ_FILTER='[.[] | {tag_name: .tag_name, assets: [.assets[] | {browser_download_url: .browser_download_url} ] } ]'
23+ page=1
24+ tmpfile="$(mktemp)"
25+ : > "$tmpfile"
26+ while :; do
27+ echo "Fetching SeleniumHQ/selenium releases page $page..."
28+ resp=$(curl -fsSL \
29+ -H "Authorization: token $TOKEN" \
30+ "https://api.github.com/repos/SeleniumHQ/selenium/releases?per_page=100&page=${page}")
31+ if [ "$(echo "$resp" | jq 'length')" -eq 0 ]; then
32+ break
33+ fi
34+ echo "$resp" | jq "$JQ_FILTER" >> "$tmpfile"
35+ page=$((page+1))
36+ done
37+ jq -s 'add' "$tmpfile" > selenium
38+ rm "$tmpfile"
2239 - name : Commit files
2340 id : git
2441 run : |
You can’t perform that action at this time.
0 commit comments