Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ runs:
echo "Installing crane @ ${tag} for ${os} on ${arch}"
tmp=$(mktemp -d)
cd ${tmp}
curl -fsL https://github.com/google/go-containerregistry/releases/download/${tag}/go-containerregistry_${os}_${arch}.tar.gz | tar xz ${out}
url=https://github.com/google/go-containerregistry/releases/download/${tag}/go-containerregistry_${os}_${arch}.tar.gz
curl -fsL \
--remove-on-error --retry 10 --retry-max-time 120 \
-o out.tar.gz ${url} || exit 1
Comment on lines +55 to +56

Copilot AI Nov 22, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --remove-on-error flag is not available in older versions of curl (it was added in curl 7.83.0, released in April 2022). Consider verifying that the GitHub Actions runners have a compatible curl version, or provide a fallback mechanism. Alternatively, you could manually remove the file on error: curl -fsL --retry 10 --retry-max-time 120 -o out.tar.gz ${url} || { rm -f out.tar.gz; exit 1; }

Suggested change
--remove-on-error --retry 10 --retry-max-time 120 \
-o out.tar.gz ${url} || exit 1
--retry 10 --retry-max-time 120 \
-o out.tar.gz ${url} || { rm -f out.tar.gz; exit 1; }

Copilot uses AI. Check for mistakes.
tar xz -f out.tar.gz ${out}

Copilot AI Nov 22, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tar command syntax is incorrect. The correct syntax for GNU tar is tar xzf out.tar.gz ${out} (no space between flags and argument) or tar -xzf out.tar.gz ${out} (with hyphens). The current syntax tar xz -f out.tar.gz ${out} will not work correctly because xz is treated as separate options and then -f is a separate option.

Suggested change
tar xz -f out.tar.gz ${out}
tar xzf out.tar.gz ${out}

Copilot uses AI. Check for mistakes.
chmod +x ${tmp}/${out}
PATH=${PATH}:${tmp}
echo "${tmp}" >> $GITHUB_PATH
Expand Down
Loading