Skip to content

Commit f08aefb

Browse files
shimoncohenCopilotnetanelC
authored
ci: add action-lint workflow (#89)
* ci: add action-lint workflow * ci: add action-lint check for actions directory * ci: refactor action-lint workflow and fail on error * Update .github/workflows/action-lint.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * ci: make sure actions directory exists * Update .github/workflows/action-lint.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * ci: add checksum check for reviewdog * Update .github/workflows/action-lint.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: add double quotes for variables * refactor: build yaml files list and pass to reviewdog as actionlint flags * chore: double quote parameters * chore: double quote parameters * chore: remove quotes * chore: disable SC2086 shell check for github actions output * ci: split actionlint to two seperate actions for workflows and actions * Update .github/workflows/action-lint-actions.yaml Co-authored-by: Netanel Cohen <34451523+netanelC@users.noreply.github.com> * Update .github/workflows/action-lint-workflows.yaml Co-authored-by: Netanel Cohen <34451523+netanelC@users.noreply.github.com> * ci: run only when updating relevant paths --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Netanel Cohen <34451523+netanelC@users.noreply.github.com>
1 parent 5be92fd commit f08aefb

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: reviewdog
2+
on:
3+
pull_request:
4+
paths:
5+
- "actions/**"
6+
7+
jobs:
8+
actionlint-actions:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
12+
- name: Build actionlint flags
13+
id: build_flags
14+
run: |
15+
files="$(find actions -type f \( -name 'action.yml' -o -name 'action.yaml' \) | paste -sd' ' -)"
16+
# shellcheck disable=SC2086
17+
echo "flags=$files" >> $GITHUB_OUTPUT
18+
- uses: reviewdog/action-actionlint@a5524e1c19e62881d79c1f1b9b6f09f16356e281 # v1.65.2
19+
with:
20+
github_token: ${{ secrets.GH_PAT }}
21+
reporter: github-pr-review
22+
actionlint_flags: ${{ steps.build_flags.outputs.flags }}
23+
fail_level: error
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: reviewdog
2+
on:
3+
pull_request:
4+
paths:
5+
- ".github/workflows/**"
6+
7+
jobs:
8+
actionlint-workflows:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
12+
- uses: reviewdog/action-actionlint@a5524e1c19e62881d79c1f1b9b6f09f16356e281 # v1.65.2
13+
with:
14+
github_token: ${{ secrets.GH_PAT }}
15+
reporter: github-pr-review
16+
fail_level: error

0 commit comments

Comments
 (0)