chainguard-dev / chainguard-dev/actions

Improve release asset download

Open
#298 0 comments 0 reactions 0 assignees View on GitHub

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}"

source

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.