Created
August 21, 2024 20:39
-
-
Save sephraim/5075fb1446c77e55d80b1dc7386ce138 to your computer and use it in GitHub Desktop.
[GitHub Actions - Lint shell scripts with Differential Shellcheck]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FILE: .github/workflows/lint-shell-scripts.yml | |
# SOURCE: https://github.com/koalaman/shellcheck/wiki/GitHub-Actions | |
name: Lint shell scripts | |
on: | |
push: | |
branches: | |
- main | |
- master | |
- develop | |
paths: | |
- 'bin/**' | |
- '.githooks/**' | |
pull_request: | |
branches: | |
- main | |
- master | |
- develop | |
paths: | |
- 'bin/**' | |
- '.githooks/**' | |
permissions: | |
contents: read | |
jobs: | |
Lint: | |
runs-on: ubuntu-latest | |
permissions: | |
# required for all workflows | |
security-events: write | |
# only required for workflows in private repositories | |
actions: read | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# Differential ShellCheck requires full git history | |
fetch-depth: 0 | |
- name: Run linting | |
uses: redhat-plumbers-in-action/differential-shellcheck@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment