Skip to content

Commit

Permalink
ci-release: wget need token
Browse files Browse the repository at this point in the history
  • Loading branch information
myfreeer authored Jul 29, 2023
1 parent 2da3656 commit ba5ca41
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,16 @@ jobs:
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/runs/${{ github.event.inputs.run_id }}/artifacts > artifacts.json
cat artifacts.json
desired_prefix="developer.mozilla.org_"
archive_download_urls=$(cat artifacts.json | jq -r --arg desired_prefix "$desired_prefix" '.artifacts[] | select(.name | startswith($desired_prefix)).archive_download_url')
echo $archive_download_urls
echo "archive_download_urls=$archive_download_urls" >> $GITHUB_ENV
- name: Download artifacts
run: |
archive_download_urls=${{ env.archive_download_urls }}
desired_prefix="developer.mozilla.org_"
archive_download_urls=$(cat artifacts.json | jq -r --arg desired_prefix "$desired_prefix" '.artifacts[] | select(.name | startswith($desired_prefix)).archive_download_url')
echo $archive_download_urls
mkdir -p download
pushd download
for url in $archive_download_urls; do
wget "$url"
wget --header="Authorization: Bearer ${{ secrets.GH_ACTION_TOKEN }}" "$url"
done
mkdir -p ../release
for zip_file in $(ls); do
Expand Down

0 comments on commit ba5ca41

Please sign in to comment.