Files
grafana/.github/workflows/shellcheck.yml
Kevin Minehart 488caa12ec CI: Avoid running on 'push' in mirrors / forks (#110063)
* CI: Avoid running on 'push' in mirrors / forks

* use single quotes
2025-08-22 18:35:52 -05:00

32 lines
808 B
YAML

name: Shellcheck
on:
push:
branches:
- main
- release-*
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
shellcheck:
# Run on `grafana/grafana` main branch, or on pull requests to prevent double-running on mirrors
if: (github.event_name == 'pull_request' || (github.event_name == 'push' && github.repository == 'grafana/grafana'))
name: Shellcheck scripts
runs-on: ubuntu-latest
permissions:
contents: read # clone the repository
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Run Shellcheck
run: find scripts/ -name '*.sh' -type f -exec shellcheck -e SC1071 -e SC2162 '{}' +