From a0eff64e4fd3e8165651a2938ab769856bf77e22 Mon Sep 17 00:00:00 2001 From: "James M. Greene" Date: Wed, 21 Jul 2021 14:13:44 -0500 Subject: [PATCH] Lint `*.yaml` workflows, too (#20445) * Lint .yaml workflows, too * Ignore workflow that uses non-GA-ed feature * Update to the latest actions-linter to fix the partial-expression problem (cschleiden/github-actions-parser#18) --- .github/allowed-actions.js | 2 +- .github/workflows/workflow-lint.yml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/allowed-actions.js b/.github/allowed-actions.js index d4404be8a8..18ac42218f 100644 --- a/.github/allowed-actions.js +++ b/.github/allowed-actions.js @@ -14,7 +14,7 @@ export default [ 'andymckay/labeler@22d5392de2b725cea4b284df5824125054049d84', 'crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688', 'crykn/copy_folder_to_another_repo_action@0282e8b9fef06de92ddcae9fe6cb44df6226646c', - 'cschleiden/actions-linter@5f9827c6b731d2c2480cd3bccf82079bbba832fc', + 'cschleiden/actions-linter@caffd707beda4fc6083926a3dff48444bc7c24aa', // uses github-actions-parser v0.23.0 'dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911', 'docker://chinthakagodawita/autoupdate-action:v1', 'dorny/paths-filter@eb75a1edc117d3756a18ef89958ee59f9500ba58', diff --git a/.github/workflows/workflow-lint.yml b/.github/workflows/workflow-lint.yml index 551180b03b..b641911759 100644 --- a/.github/workflows/workflow-lint.yml +++ b/.github/workflows/workflow-lint.yml @@ -11,9 +11,11 @@ on: - main paths: - '.github/workflows/*.yml' + - '.github/workflows/*.yaml' pull_request: paths: - '.github/workflows/*.yml' + - '.github/workflows/*.yaml' jobs: lint: @@ -24,6 +26,6 @@ jobs: uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f - name: Run linter - uses: cschleiden/actions-linter@5f9827c6b731d2c2480cd3bccf82079bbba832fc + uses: cschleiden/actions-linter@caffd707beda4fc6083926a3dff48444bc7c24aa with: - workflows: '[".github/workflows/*.yml"]' + workflows: '[".github/workflows/*.yml", ".github/workflows/*.yaml", "!.github/workflows/remove-from-fr-board.yaml"]'