|
| 1 | +--- |
| 2 | +################################# |
| 3 | +################################# |
| 4 | +## Super Linter GitHub Actions ## |
| 5 | +################################# |
| 6 | +################################# |
| 7 | +name: Lint Code Base |
| 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 push # |
| 16 | +############################# |
| 17 | +on: |
| 18 | + push: |
| 19 | + pull_request: |
| 20 | + schedule: |
| 21 | + - cron: "0 0 * * 0" |
| 22 | + workflow_dispatch: |
| 23 | + |
| 24 | +permissions: {} |
| 25 | + |
| 26 | +############### |
| 27 | +# Set the Job # |
| 28 | +############### |
| 29 | +jobs: |
| 30 | + lint: |
| 31 | + # Name the Job |
| 32 | + name: Lint Code Base |
| 33 | + # Set the agent to run on |
| 34 | + runs-on: ubuntu-latest |
| 35 | + |
| 36 | + ############################################ |
| 37 | + # Grant status permission for MULTI_STATUS # |
| 38 | + ############################################ |
| 39 | + permissions: |
| 40 | + contents: read |
| 41 | + packages: read |
| 42 | + statuses: write |
| 43 | + |
| 44 | + ################## |
| 45 | + # Load all steps # |
| 46 | + ################## |
| 47 | + steps: |
| 48 | + ########################## |
| 49 | + # Checkout the code base # |
| 50 | + ########################## |
| 51 | + - name: Checkout Code |
| 52 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 53 | + with: |
| 54 | + # Full git history is needed to get a proper list of changed |
| 55 | + # files within `super-linter` |
| 56 | + fetch-depth: 0 |
| 57 | + persist-credentials: false |
| 58 | + |
| 59 | + ################################ |
| 60 | + # Run Linter against code base # |
| 61 | + ################################ |
| 62 | + - name: Lint Code Base |
| 63 | + uses: super-linter/super-linter@ffde3b2b33b745cb612d787f669ef9442b1339a6 # v8.1.0 |
| 64 | + env: |
| 65 | + VALIDATE_ALL_CODEBASE: true |
| 66 | + LINTER_RULES_PATH: . |
| 67 | + DEFAULT_BRANCH: main |
| 68 | + ENFORCE_COMMITLINT_CONFIGURATION_CHECK: true |
| 69 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments