From b5153aa939923182cbdb62587c317454b0508bce Mon Sep 17 00:00:00 2001 From: Jennifer Power Date: Wed, 4 Dec 2024 11:02:25 -0500 Subject: [PATCH 1/3] ci: adds an actionlint workflow Signed-off-by: Jennifer Power --- .github/actionlint-matcher.json | 17 +++++++++++++++++ .github/workflows/actionlint.yml | 24 ++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .github/actionlint-matcher.json create mode 100644 .github/workflows/actionlint.yml diff --git a/.github/actionlint-matcher.json b/.github/actionlint-matcher.json new file mode 100644 index 000000000..7b1ba251e --- /dev/null +++ b/.github/actionlint-matcher.json @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "actionlint", + "pattern": [ + { + "regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$", + "file": 1, + "line": 2, + "column": 3, + "message": 4, + "code": 5 + } + ] + } + ] + } \ No newline at end of file diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 000000000..87d46bdf2 --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,24 @@ +name: Lint GitHub Actions workflows + +on: + push: + branches: + - develop + pull_request: + paths: + - '.github/**' + +permissions: read-all + +jobs: + actionlint: + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + - name: Add problem matcher + run: echo "::add-matcher::.github/actionlint-matcher.json" + - name: Check workflow files + uses: docker://rhysd/actionlint:1.7.4 + with: + args: -color -shellcheck= \ No newline at end of file From 9af5eefdcc0f656c74a4ed9d040d315f70dd3950 Mon Sep 17 00:00:00 2001 From: Jennifer Power Date: Wed, 4 Dec 2024 13:55:04 -0500 Subject: [PATCH 2/3] docs: adds steps for testing GH Actions in PR template The steps are commented and can be uncommeted when changes are to GitHub Actions workflows Signed-off-by: Jennifer Power --- .github/PULL_REQUEST_TEMPLATE.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index fdba2d196..75854388f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -17,6 +17,20 @@ - [ ] All new and existing tests passed. - [ ] All commits are signed-off. + + + + ## Summary ## Key links: From 529ddb3104cdf3a530afaf77d8ab8023bfae2294 Mon Sep 17 00:00:00 2001 From: Jennifer Power Date: Wed, 4 Dec 2024 13:58:33 -0500 Subject: [PATCH 3/3] style: adds newline at the end of new files Signed-off-by: Jennifer Power --- .github/actionlint-matcher.json | 2 +- .github/workflows/actionlint.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actionlint-matcher.json b/.github/actionlint-matcher.json index 7b1ba251e..09211db2f 100644 --- a/.github/actionlint-matcher.json +++ b/.github/actionlint-matcher.json @@ -14,4 +14,4 @@ ] } ] - } \ No newline at end of file + } diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml index 87d46bdf2..2cd9ad2fa 100644 --- a/.github/workflows/actionlint.yml +++ b/.github/workflows/actionlint.yml @@ -21,4 +21,4 @@ jobs: - name: Check workflow files uses: docker://rhysd/actionlint:1.7.4 with: - args: -color -shellcheck= \ No newline at end of file + args: -color -shellcheck=