mirror of
https://github.com/imjasonh/setup-crane
synced 2026-07-07 23:15: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
|
esac
|
||||||
|
|
||||||
os="${RUNNER_OS}"
|
os="${RUNNER_OS}"
|
||||||
if [[ $os == "macOS" ]]; then
|
if [[ "$os" == "macOS" ]]; then
|
||||||
os="Darwin"
|
os="Darwin"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -50,16 +50,16 @@ runs:
|
||||||
out=crane.exe
|
out=crane.exe
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -z ${url} ]]; then
|
if [[ ! -z "${url}" ]]; then
|
||||||
echo "Installing crane for ${os} on ${arch}"
|
echo "Installing crane for ${os} on ${arch}"
|
||||||
tmp=$(mktemp -d)
|
tmp=$(mktemp -d)
|
||||||
cd ${tmp}
|
cd "${tmp}"
|
||||||
fname="go-containerregistry_${os}_${arch}.tar.gz"
|
fname="go-containerregistry_${os}_${arch}.tar.gz"
|
||||||
curl -o "$fname" -fsSL --retry 5 --retry-delay 1 --retry-all-errors "${url}/${fname}"
|
curl -o "$fname" -fsSL --retry 5 --retry-delay 1 --retry-all-errors "${url}/${fname}"
|
||||||
tar xzf "$fname" ${out}
|
tar xzf "$fname" "${out}"
|
||||||
chmod +x ${tmp}/${out}
|
chmod +x "${tmp}/${out}"
|
||||||
PATH=${PATH}:${tmp}
|
PATH="${PATH}:${tmp}"
|
||||||
echo "${tmp}" >> $GITHUB_PATH
|
echo "${tmp}" >> "$GITHUB_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# NB: username doesn't seem to matter.
|
# NB: username doesn't seem to matter.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue