|
| 1 | +--- |
| 2 | +################################# |
| 3 | +################################# |
| 4 | +## Super Linter GitHub Actions ## |
| 5 | +################################# |
| 6 | +################################# |
| 7 | +name: Lint Code Base |
| 8 | + |
| 9 | +# |
| 10 | +# Documentation: |
| 11 | +# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions |
| 12 | +# |
| 13 | + |
| 14 | +############################# |
| 15 | +# Start the job on all push # |
| 16 | +############################# |
| 17 | +on: |
| 18 | + # push: |
| 19 | + # branches-ignore: [main] |
| 20 | + # Remove the line above to run when pushing to master |
| 21 | + pull_request: |
| 22 | + branches: [main] |
| 23 | + |
| 24 | +############### |
| 25 | +# Set the Job # |
| 26 | +############### |
| 27 | +jobs: |
| 28 | + build: |
| 29 | + # Name the Job |
| 30 | + name: Lint Code Base |
| 31 | + # Set the agent to run on |
| 32 | + runs-on: ubuntu-latest |
| 33 | + |
| 34 | + ############################################ |
| 35 | + # Grant status permission for MULTI_STATUS # |
| 36 | + ############################################ |
| 37 | + permissions: |
| 38 | + contents: read |
| 39 | + packages: read |
| 40 | + statuses: write |
| 41 | + |
| 42 | + ################## |
| 43 | + # Load all steps # |
| 44 | + ################## |
| 45 | + steps: |
| 46 | + ########################## |
| 47 | + # Checkout the code base # |
| 48 | + ########################## |
| 49 | + - name: Checkout Code |
| 50 | + uses: actions/checkout@v4 |
| 51 | + with: |
| 52 | + # Full git history is needed to get a proper |
| 53 | + # list of changed files within `super-linter` |
| 54 | + fetch-depth: 0 |
| 55 | + |
| 56 | + ################################ |
| 57 | + # Run Linter against code base # |
| 58 | + ################################ |
| 59 | + - name: Lint Code Base |
| 60 | + uses: super-linter/super-linter@v7 |
| 61 | + env: |
| 62 | + VALIDATE_ALL_CODEBASE: false |
| 63 | + DEFAULT_BRANCH: main |
| 64 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments