-
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.57 KB
/
yaml.integration.yaml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Integration (YAML)
on:
push:
branches:
- main
pull_request: {}
concurrency:
group: yaml-integration-${{ github.ref }}
cancel-in-progress: true
jobs:
changed:
name: Filter Changed Files and Directories
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.set-outputs.outputs.changed }}
modified: ${{ steps.set-outputs.outputs.modified }}
changed_files: ${{ steps.set-outputs.outputs.changed_files }}
modified_files: ${{ steps.set-outputs.outputs.modified_files }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Changed Files
id: changed-files
uses: tj-actions/changed-files@v43
with:
files: |
**/*.yaml
**/*.yml
json: true
- name: Set outputs
id: set-outputs
run: |
echo "changed=${{ steps.changed-files.outputs.any_changed }}" >> $GITHUB_OUTPUT
echo "modified=${{ steps.changed-files.outputs.any_modified }}" >> $GITHUB_OUTPUT
echo "changed_files=${{ steps.changed-files.outputs.all_changed_files }}" >> $GITHUB_OUTPUT
echo "modified_files=${{ steps.changed-files.outputs.all_modified_files }}" >> $GITHUB_OUTPUT
lint:
name: Lint (yamllint)
needs:
- changed
if: ${{ needs.changed.outputs.modified == 'true' }}
uses: tedilabs/.github/.github/workflows/yaml.yamllint.yaml@main
with:
yamllint_version: latest
yamllint_config_file: .yamllint.yaml
yamllint_target_dir: ./
secrets:
token: ${{ secrets.GITHUB_TOKEN }}