Skip to content

Commit

Permalink
Set up CI to lint workflows with action-validator
Browse files Browse the repository at this point in the history
  • Loading branch information
Johennes committed Nov 22, 2023
1 parent 0a558d3 commit 44569d9
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Static Analysis
on:
pull_request: {}
push:
branches: [develop]
jobs:
workflow_lint:
name: "Workflow Lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
cache: "yarn"

- name: Install Deps
run: "yarn install --frozen-lockfile"

- name: Run Linter
run: "yarn lint:workflows"
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"scripts": {
"lint": "yarn lint:workflows",
"lint:workflows": "find .github/workflows -type f \\( -iname '*.yaml' -o -iname '*.yml' \\) | xargs -I {} sh -c 'echo \"Linting {}\"; action-validator \"{}\"'",
"sync-labels": "yarn ts-node .github/actions/sync-labels.ts"
},
"devDependencies": {
"@action-validator/cli": "^0.5.3",
"@action-validator/core": "^0.5.3",
"@types/github-label-sync": "^2.3.3",
"@types/node": "^20.9.2",
"commander": "^11.1.0",
Expand Down
17 changes: 17 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
# yarn lockfile v1


"@action-validator/cli@^0.5.3":
version "0.5.3"
resolved "https://registry.yarnpkg.com/@action-validator/cli/-/cli-0.5.3.tgz#2d4fe473058f6ef17530b9bb5929f0eade4e8672"
integrity sha512-u/kv77ZC55PfAc9RQeP76xV1GysTisEJjO+b5TgCrBBcaKtGLt5Y7ki2GSdc7CDzncNc1oeoGcwaLMW6JSdQAw==
dependencies:
chalk "5.2.0"

"@action-validator/core@^0.5.3":
version "0.5.3"
resolved "https://registry.yarnpkg.com/@action-validator/core/-/core-0.5.3.tgz#493b850ef7a2801830069d78f60cbefe0697423f"
integrity sha512-0ABelaY7nmpvV5q0z8Vl1cDeq2OZ1HyNXjXS54fBadLaCssZLbDvTa7M2uUaNMcEWV+Xl48WWbnqJWKePt9qHQ==

"@cspotcode/source-map-support@^0.8.0":
version "0.8.1"
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1"
Expand Down Expand Up @@ -192,6 +204,11 @@ caseless@~0.12.0:
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==

[email protected]:
version "5.2.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3"
integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==

chalk@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
Expand Down

0 comments on commit 44569d9

Please sign in to comment.