Skip to content

Commit

Permalink
No bash
Browse files Browse the repository at this point in the history
Signed-off-by: Paulo Gomes <[email protected]>
  • Loading branch information
pjbgf committed Dec 10, 2024
1 parent 0b0bc2e commit d1b9a14
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions actions/install-slsactl/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ runs:

- name: Install slsactl from gh release
if: runner.os == 'Linux'
shell: bash
run: |
set -x
if [[ "${VERSION}" == "latest" ]]; then
echo 'Checking what the latest version is'
VERSION=$(curl -s 'https://api.github.com/repos/rancherlabs/slsactl/releases/latest' | jq -r '.tag_name')
Expand Down Expand Up @@ -79,14 +79,17 @@ runs:
curl -LO "https://${REPO}/releases/download/${VERSION}/${FILE}"
grep "${FILE}" "slsactl_${VERSION#v}_checksums.txt" | sha256sum -c
chmod +x "${FILE}"
sudo mv "${FILE}" /usr/local/bin/slsactl
chmod +x "${FILE}"
if sudo -l &> /dev/null; then
sudo mv "${FILE}" /usr/local/bin/slsactl
else
mv "${FILE}" /usr/local/bin/slsactl
fi
env:
VERSION: ${{ inputs.version }}
REPO: github.com/rancherlabs/slsactl

- name: Print version
shell: bash
run: |
echo "slsactl installed:"
slsactl version

0 comments on commit d1b9a14

Please sign in to comment.