43 lines
1.0 KiB
YAML
43 lines
1.0 KiB
YAML
name: "Shell scripts"
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "**.sh"
|
|
- ".github/workflows/shellcheck.yaml"
|
|
push:
|
|
branches: ["main"]
|
|
paths:
|
|
- "**.sh"
|
|
- ".github/workflows/shellcheck.yaml"
|
|
workflow_dispatch: null
|
|
|
|
permissions: {}
|
|
|
|
# Only allow one run of the workflow per branch / PR at a time.
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
shellcheck:
|
|
name: "shellcheck"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
runs-on: ubuntu-26.04
|
|
timeout-minutes: 10
|
|
|
|
# Pinned, since findings differ across shellcheck versions.
|
|
container: koalaman/shellcheck-alpine:v0.11.0@sha256:9955be09ea7f0dbf7ae942ac1f2094355bb30d96fffba0ec09f5432207544002
|
|
|
|
steps:
|
|
- name: "Checkout repository"
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: "Run shellcheck"
|
|
run: find . -name '*.sh' -not -path './.git/*' -exec shellcheck {} +
|