|
| 1 | +--- |
| 2 | +########################### |
| 3 | +########################### |
| 4 | +## Linter GitHub Actions ## |
| 5 | +########################### |
| 6 | +########################### |
| 7 | +name: Linter |
| 8 | + |
| 9 | +# |
| 10 | +# Documentation: |
| 11 | +# https://help.github.com/en/articles/workflow-syntax-for-github-actions |
| 12 | +# |
| 13 | + |
| 14 | +#################################################################### |
| 15 | +# Start the job on all pull requests that target the master branch # |
| 16 | +#################################################################### |
| 17 | +on: |
| 18 | + pull_request: |
| 19 | + branches: [master] |
| 20 | + |
| 21 | +############### |
| 22 | +# Set the Job # |
| 23 | +############### |
| 24 | +permissions: |
| 25 | + contents: read |
| 26 | + |
| 27 | +jobs: |
| 28 | + linter: |
| 29 | + # Name the Job |
| 30 | + permissions: |
| 31 | + contents: read # for actions/checkout to fetch code |
| 32 | + statuses: write # for github/super-linter to mark status of each linter run |
| 33 | + name: Lint Code Base |
| 34 | + # Set the agent to run on |
| 35 | + runs-on: ubuntu-latest |
| 36 | + |
| 37 | + ################## |
| 38 | + # Load all steps # |
| 39 | + ################## |
| 40 | + steps: |
| 41 | + ########################## |
| 42 | + # Checkout the code base # |
| 43 | + ########################## |
| 44 | + - name: Checkout Code |
| 45 | + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 |
| 46 | + with: |
| 47 | + # Full git history is needed to get a proper list of changed files within `super-linter` |
| 48 | + fetch-depth: 0 |
| 49 | + |
| 50 | + ################################ |
| 51 | + # Run Linter against code base # |
| 52 | + ################################ |
| 53 | + - name: Lint Code Base |
| 54 | + uses: github/super-linter@45fc0d88288beee4701c62761281edfee85655d7 # v5.0.0 |
| 55 | + env: |
| 56 | + VALIDATE_ALL_CODEBASE: false |
| 57 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 58 | + # Markdown lint complains about the issue templates |
| 59 | + FILTER_REGEX_EXCLUDE: .github/ISSUE_TEMPLATE/* |
| 60 | + # Lots of shellcheck errors - need fixing |
| 61 | + VALIDATE_BASH: false |
0 commit comments