mirror of
https://github.com/imjasonh/setup-crane
synced 2026-07-06 22:52:45 +00:00
Merge pull request #19 from imjasonh/copilot/quote-variables-in-conditions
Quote shell variables in setup action extraction path handling
This commit is contained in:
commit
feee3b6bb0
1 changed files with 7 additions and 7 deletions
14
action.yml
14
action.yml
|
|
@ -36,7 +36,7 @@ runs:
|
|||
esac
|
||||
|
||||
os="${RUNNER_OS}"
|
||||
if [[ $os == "macOS" ]]; then
|
||||
if [[ "$os" == "macOS" ]]; then
|
||||
os="Darwin"
|
||||
fi
|
||||
|
||||
|
|
@ -50,16 +50,16 @@ runs:
|
|||
out=crane.exe
|
||||
fi
|
||||
|
||||
if [[ ! -z ${url} ]]; then
|
||||
if [[ ! -z "${url}" ]]; then
|
||||
echo "Installing crane for ${os} on ${arch}"
|
||||
tmp=$(mktemp -d)
|
||||
cd ${tmp}
|
||||
cd "${tmp}"
|
||||
fname="go-containerregistry_${os}_${arch}.tar.gz"
|
||||
curl -o "$fname" -fsSL --retry 5 --retry-delay 1 --retry-all-errors "${url}/${fname}"
|
||||
tar xzf "$fname" ${out}
|
||||
chmod +x ${tmp}/${out}
|
||||
PATH=${PATH}:${tmp}
|
||||
echo "${tmp}" >> $GITHUB_PATH
|
||||
tar xzf "$fname" "${out}"
|
||||
chmod +x "${tmp}/${out}"
|
||||
PATH="${PATH}:${tmp}"
|
||||
echo "${tmp}" >> "$GITHUB_PATH"
|
||||
fi
|
||||
|
||||
# NB: username doesn't seem to matter.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue