From 3c986e667d533ad93044d5a07f8a425465c2f50b Mon Sep 17 00:00:00 2001 From: Robin Tuszik Date: Thu, 19 Sep 2024 15:32:23 +0200 Subject: [PATCH] ci(super-linter.yml): update workflow triggers to ignore push to main and run on pull request to main ci(super-linter.yml): add workflow_dispatch trigger for manual runs ci(super-linter.yml): add permissions block for enhanced security ci(super-linter.yml): update actions/checkout to version 4 for latest features and fixes ci(super-linter.yml): fix indentation and spacing issues for better readability --- .github/workflows/super-linter.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index 332cf76..fdb41ea 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -1,13 +1,25 @@ name: Lint -on: [push, pull_request] +on: + push: + branches-ignore: ["main"] + pull_request: + branches: ["main"] + workflow_dispatch: + +permissions: {} + jobs: lint: runs-on: ubuntu-latest - steps: + permissions: + contents: read + packages: read + statuses: write + steps: - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -18,7 +30,7 @@ jobs: VALIDATE_HTML: true FIX_PYTHON_RUFF: true VALIDATE_PYTHON_RUFF: true - VALIDATE_MARKDOWN_PRETTIER : true + VALIDATE_MARKDOWN_PRETTIER: true VALIDATE_GITLEAKS: true VALIDATE_GITHUB_ACTIONS: true - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}