forked from awsdocs/aws-doc-sdk-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.02 KB
/
yaml-lint.yml
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
name: Lint Metadata Yaml
on:
pull_request:
workflow_dispatch:
jobs:
yamllint:
name: Lint Yaml
runs-on: ubuntu-latest
steps:
- name: Checkout files
uses: actions/checkout@v4
with:
sparse-checkout: |
.github
.doc_gen/metadata
.tools
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
with:
files: ".doc_gen/metadata/**/*.{yml,yaml}"
- name: Setup Python
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install dependencies
if: steps.changed-files.outputs.any_changed == 'true'
run: >-
python3 -m pip install -r .tools/base_requirements.txt
- name: Lint metadata files
if: steps.changed-files.outputs.any_changed == 'true'
run: >-
yamllint --format standard -c .tools/validation/.yamllint.yaml .doc_gen/metadata