Skip to content

Commit

Permalink
test: always use latest github shellcheck artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
thatRichman committed Dec 15, 2024
1 parent b0073be commit 006facf
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/actions/install-shellcheck/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,27 @@ description: "Installs ShellCheck. Supports Ubuntu, macOS, and Windows."
runs:
using: "composite"
steps:
- uses: awalsh128/cache-apt-pkgs-action@latest
- name: install shellcheck -- Ubuntu
shell: bash
if: runner.os == 'Linux'
with:
packages: shellcheck
version: 1.0
run: |
gh release download -R koalaman/shellcheck -p 'shellcheck-v*.linux.x86_64.tar.xz' -O shellcheck-latest.tar.xz
tar -xvf shellcheck-latest.tar.xz
chmod +x ./shellcheck
echo ${{github.workspace}} >> "$GITHUB_PATH"
export PATH="$PATH":"$(pwd)"
- name: install shellcheck -- macOS
shell: bash
if: runner.os == 'macOS'
run: brew install shellcheck
run: |
gh release download -R koalaman/shellcheck -p 'shellcheck-v*.darwin.aarch64.tar.xz' -O shellcheck-latest.tar.xz
tar -xvf shellcheck-latest.tar.xz
chmod +x ./shellcheck
echo ${{github.workspace}} >> "$GITHUB_PATH"
- name: install shellcheck -- Windows
if: runner.os == 'Windows'
shell: powershell
run: |
gh release download -R koalaman/shellcheck -p 'shellcheck-v*.zip' -O shellcheck-latest.zip
7z x shellcheck-latest.zip
Add-Content $env:GITHUB_PATH "$(Get-Location).Path"
- name: test for shellcheck - Windows
shell: powershell
if: runner.os == 'Windows'
run: where.exe shellcheck

0 comments on commit 006facf

Please sign in to comment.