chainguard-dev / chainguard-dev/actions
Improve release asset download
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 173
- Forks
- 83
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 11
Description
Currently it goes like
wget --progress=dot:giga \
https://github.com/spdx/tools-java/releases/download/v${{ inputs.spdx-tools-version }}/tools-java-${{ inputs.spdx-tools-version }}.zip
GHA images include GitHub CLI.
So we can improve the process.
mkdir -p "${{ runner.temp }}/spdx"
RELEASE_ASSET_URL="$(
gh api /repos/spdx/tools-java/releases/${{ inputs.spdx-tools-release-id }} \
--jq '."assets"[] | select(."name" | test("^tools-java-.+\\.zip$")) | ."browser_download_url"'
)"
wget --secure-protocol=TLSv1_3 --max-redirect=1 --retry-on-host-error --retry-connrefused --tries=3 \
--no-verbose --output-document="${{ runner.temp }}/spdx/tools-java.zip" "${RELEASE_ASSET_URL}"
Here is how to list releases.
gh api /repos/spdx/tools-java/releases --jq '.[] | ."name" + ":" + (."id"|tostring)'
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the workflow step that currently downloads the tools-java release asset and compare it with the commands shown in the issue. Check the GitHub CLI release lookup and wget options first; done means the workflow resolves the matching ZIP asset by release ID and downloads it to the runner temp directory with the specified retry and TLS behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, shell
- Domain
- ci-cd, release
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100