Skip to content

Commit

Permalink
ci: Install shellcheck if not present in CI runner
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjbeaumont committed Sep 13, 2024
1 parent 282f593 commit 094b94e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/soundness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ on:
type: boolean
description: "Boolean to enable the shell check job. Defaults to true."
default: true
shell_check_container_image:
type: string
description: "Container image for the shell check job. Defaults to latest Swift Ubuntu image."
default: "swift:5.10-noble"

## We are cancelling previously triggered workflow runs
concurrency:
Expand Down Expand Up @@ -158,6 +162,8 @@ jobs:
name: Shell check
if: ${{ inputs.shell_check_enabled }}
runs-on: ubuntu-latest
container:
image: ${{ inputs.shell_check_container_image }}
timeout-minutes: 5
steps:
- name: Checkout repository
Expand All @@ -168,4 +174,6 @@ jobs:
# https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Run shellcheck
run: git ls-files -z '*.sh' | xargs -0 shellcheck
run: |
apt-get -qq update && apt-get -qq -y install shellcheck
git ls-files -z '*.sh' | xargs -0 shellcheck

0 comments on commit 094b94e

Please # to comment.