-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.13 KB
/
lint-github-actions.yml
File metadata and controls
41 lines (39 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
name: lint GitHub Actions workflows
on:
pull_request:
branches: [main]
push:
branches: [main]
paths: ['.github/workflows/*.ya?ml']
workflow_dispatch:
permissions:
contents: read
jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: dorny/paths-filter@v4
id: filter
if: >-
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository
with:
filters: |
addedOrModifiedWorkflows:
- added|modified:
- .github/workflows/*.yaml
- .github/workflows/*.yml
- uses: actions/checkout@v6
if: >-
github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' ||
steps.filter.outputs.addedOrModifiedWorkflows == 'true'
- name: Check workflow files
if: >-
github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' ||
steps.filter.outputs.addedOrModifiedWorkflows == 'true'
uses: docker://rhysd/actionlint:latest
with:
args: -color