From 911836be9853c37418f4b25b65bc8118978f3000 Mon Sep 17 00:00:00 2001 From: Sam <109683132+kernelsam@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:41:08 -0800 Subject: [PATCH 1/4] linter test --- .github/workflows/lint-workflows.yaml | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/lint-workflows.yaml diff --git a/.github/workflows/lint-workflows.yaml b/.github/workflows/lint-workflows.yaml new file mode 100644 index 0000000..a5d159d --- /dev/null +++ b/.github/workflows/lint-workflows.yaml @@ -0,0 +1,50 @@ +name: 'lint workflows' + +on: + workflow_call: + inputs: + validate-all-codebase: + default: false + description: 'Lint all files or only modified: true/false.' + required: false + type: boolean + +permissions: + contents: read + packages: read + statuses: write + +jobs: + changes: + runs-on: ubuntu-latest + outputs: + workflows: ${{ steps.changes.outputs.workflows }} + steps: + - uses: actions/checkout@v3 + - uses: dorny/paths-filter@v2 + id: changes + with: + filters: | + workflows: + - '.github/workflows/**' + + lint-workflows: + name: Lint Workflows + runs-on: ubuntu-latest + needs: changes + if: ${{ needs.changes.outputs.workflows == 'true' }} + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Lint Code Base + uses: github/super-linter@v5 + env: + DEFAULT_BRANCH: main + FILTER_REGEX_INCLUDE: .*.github/workflows/.* + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # only lint new and modified files + VALIDATE_ALL_CODEBASE: false \ No newline at end of file From cd7a395bd5166347454e00e8e50d10e2e65b59c4 Mon Sep 17 00:00:00 2001 From: Sam <109683132+kernelsam@users.noreply.github.com> Date: Wed, 10 Jan 2024 13:24:14 -0800 Subject: [PATCH 2/4] #69 cleanup --- .github/workflows/add-labels-to-issue.yaml | 3 +++ .github/workflows/issue-automation.yaml | 2 +- .github/workflows/lint-workflows.yaml | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/add-labels-to-issue.yaml b/.github/workflows/add-labels-to-issue.yaml index 7fbf8c7..dd62fa6 100644 --- a/.github/workflows/add-labels-to-issue.yaml +++ b/.github/workflows/add-labels-to-issue.yaml @@ -8,6 +8,9 @@ on: SENZING_MEMBERS: required: false +permissions: + issues: write + jobs: add-customer-submission-label: diff --git a/.github/workflows/issue-automation.yaml b/.github/workflows/issue-automation.yaml index 8916d90..9a50524 100644 --- a/.github/workflows/issue-automation.yaml +++ b/.github/workflows/issue-automation.yaml @@ -3,8 +3,8 @@ name: 'issue automation' on: issues: types: - - reopened - opened + - reopened jobs: diff --git a/.github/workflows/lint-workflows.yaml b/.github/workflows/lint-workflows.yaml index a5d159d..12c72c1 100644 --- a/.github/workflows/lint-workflows.yaml +++ b/.github/workflows/lint-workflows.yaml @@ -15,6 +15,10 @@ permissions: statuses: write jobs: + # In order to require linting as a status check we need to + # run the overall workflow on every pr. + # This is used to skip at the job level if there are no + # changes to the workflow files. changes: runs-on: ubuntu-latest outputs: From 939825249d1548bb0c3ee7824880744bd5747c66 Mon Sep 17 00:00:00 2001 From: Sam <109683132+kernelsam@users.noreply.github.com> Date: Wed, 10 Jan 2024 13:25:27 -0800 Subject: [PATCH 3/4] #69 fix linting --- .github/workflows/lint-workflows.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-workflows.yaml b/.github/workflows/lint-workflows.yaml index 12c72c1..501662e 100644 --- a/.github/workflows/lint-workflows.yaml +++ b/.github/workflows/lint-workflows.yaml @@ -51,4 +51,4 @@ jobs: FILTER_REGEX_INCLUDE: .*.github/workflows/.* GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # only lint new and modified files - VALIDATE_ALL_CODEBASE: false \ No newline at end of file + VALIDATE_ALL_CODEBASE: false From c3f20f4347a14f5298771b80f9c6fa3e3755f4cf Mon Sep 17 00:00:00 2001 From: Sam <109683132+kernelsam@users.noreply.github.com> Date: Wed, 10 Jan 2024 13:28:25 -0800 Subject: [PATCH 4/4] #69 fix linting --- .github/workflows/lint-workflows.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-workflows.yaml b/.github/workflows/lint-workflows.yaml index 501662e..4f50320 100644 --- a/.github/workflows/lint-workflows.yaml +++ b/.github/workflows/lint-workflows.yaml @@ -15,7 +15,7 @@ permissions: statuses: write jobs: - # In order to require linting as a status check we need to + # In order to require linting as a status check we need to # run the overall workflow on every pr. # This is used to skip at the job level if there are no # changes to the workflow files.