Skip to content

Commit 35a59d4

Browse files
committed
Add reusable yamllinter workflow
1 parent b442ea4 commit 35a59d4

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/yamllinter.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
4+
workflow_call:
5+
inputs:
6+
repository:
7+
description: 'The repository that needs linting'
8+
type: string
9+
default: ${{ github.repository }}
10+
required: false
11+
ref:
12+
description: 'The branch, tag or SHA that needs linting'
13+
type: string
14+
required: false
15+
default: ${{ github.ref }}
16+
config_file:
17+
description: 'The location of the linter-configuration'
18+
type: string
19+
required: false
20+
default: ''
21+
22+
jobs:
23+
linter:
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- name: Checkout Code
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
repository: ${{ inputs.repository }}
32+
ref: ${{ inputs.ref }}
33+
34+
- name: Lint YAML
35+
uses: ibiqlik/action-yamllint@v3.1.1
36+
with:
37+
config_file: ${{ inputs.config_file }}

0 commit comments

Comments
 (0)