Skip to content

Commit

Permalink
Merge pull request #275 from russellb/actionlint
Browse files Browse the repository at this point in the history
Add actionlint workflow
  • Loading branch information
mergify[bot] authored Apr 19, 2024
2 parents 13300c2 + c42e9be commit 6967cf9
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ pull_request_rules:
- check-success=Shellcheck
- check-success=markdown-lint
- check-success=DCO
# If files are changed in .github/, the actionlint check must pass
- or:
- and:
# regex should match the one in .github/workflows/actionlint.yml
- files~=.github/.*$
- check-success=actionlint
- -files~=.github/.*$
actions:
merge:
method: merge
24 changes: 24 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint GitHub Actions workflows
on:
push:
branches: ["main"]
paths:
- '.github/**'
pull_request:
branches: ["main"]
paths:
# This regex should match the one used for mergify policy in .github/mergify.yml
- '.github/**'

jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
shell: bash
- name: Check workflow files
run: PATH=".:$PATH" make action-lint
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/lint-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ jobs:
go-version-file: gobot/go.mod
- name: Go Format
run: |
[ -z "$(gofmt -l .)" ] || (echo "$(gofmt -l .)" && exit 1)
[ -z "$(gofmt -l .)" ] || (gofmt -l . && exit 1)

0 comments on commit 6967cf9

Please sign in to comment.