File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828jobs :
2929 auto-proto-convert :
3030 runs-on : ubuntu-latest
31+ permissions :
32+ actions : read
33+ contents : read
3134 steps :
3235 - name : Checkout Repository
3336 uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
5558 exit 1
5659 fi
5760
61+ # repository_dispatch currently supplies GitHub's artifact page URL. That
62+ # URL is intended for browsers; use the REST API endpoint that returns the ZIP.
63+ if [[ "$ARTIFACT_DOWNLOAD_URL" =~ ^https://github\.com/([^/]+)/([^/]+)/actions/runs/[0-9]+/artifacts/([0-9]+)/?$ ]]; then
64+ ARTIFACT_DOWNLOAD_URL="https://api.github.com/repos/${BASH_REMATCH[1]}/${BASH_REMATCH[2]}/actions/artifacts/${BASH_REMATCH[3]}/zip"
65+ fi
66+
5867 echo "artifact_download_url=$ARTIFACT_DOWNLOAD_URL" >> "$GITHUB_OUTPUT"
5968 echo "source_commit=${API_SPEC_COMMIT:-unknown}" >> "$GITHUB_OUTPUT"
6069 echo "run_id=${API_SPEC_RUN_ID:-unknown}" >> "$GITHUB_OUTPUT"
6372 env :
6473 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6574 run : |
66- curl -L \
75+ curl --fail --location --show-error \
6776 -H "Authorization: Bearer $GH_TOKEN" \
6877 -H "Accept: application/vnd.github+json" \
6978 -o api-spec-build.zip \
You can’t perform that action at this time.
0 commit comments