diff --git a/.github/workflows/call-local-super-linter.yaml b/.github/workflows/call-local-super-linter.yaml index df889c2..8a3c113 100644 --- a/.github/workflows/call-local-super-linter.yaml +++ b/.github/workflows/call-local-super-linter.yaml @@ -5,6 +5,9 @@ name: Lint +# disable all permissions by default. We will enable necessary permissions in a job +permissions: {} + on: push: branches: @@ -23,7 +26,9 @@ jobs: name: Call Super-Linter uses: ./.github/workflows/reusable-super-linter.yaml +# with: +# runner-labels: '["self-hosted", "Linux"]' permissions: contents: read # clone the repo to lint - statuses: write #read/write to repo custom statuses \ No newline at end of file + statuses: write #read/write to repo custom statuses diff --git a/.github/workflows/reusable-super-linter.yaml b/.github/workflows/reusable-super-linter.yaml index 170fcd4..628f3ac 100644 --- a/.github/workflows/reusable-super-linter.yaml +++ b/.github/workflows/reusable-super-linter.yaml @@ -26,6 +26,11 @@ on: description: A regex to exclude files from linting required: false type: string + runner-labels: + description: 'runs-on override (format: ''["self-hosted", "Linux"]'')' + required: false + type: string + default: '["ubuntu-latest"]' permissions: contents: read # git permissions to repo pull/push @@ -36,7 +41,7 @@ jobs: name: Super-Linter - runs-on: ubuntu-latest + runs-on: "${{ fromJSON(inputs.runner-labels) }}" steps: - name: Checkout Code diff --git a/README.md b/README.md index 67bb6d9..e97ad64 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,11 @@ jobs: ### A regex to exclude files from linting ### defaults to empty # filter-regex-exclude: html/.* + + ### For adjusting the runner's configuration + ### defaults to '["ubuntu-latest"]' + # runner-labels: '["self-hosted", "Linux"]' + ``` ## How to run Super-Linter locally