-
-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (47 loc) · 1.51 KB
/
validate_blueprint.yml
File metadata and controls
55 lines (47 loc) · 1.51 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
name: Validate Blueprint YAML
# yamllint disable-line rule:truthy
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
code_scan:
name: Validate Blueprint YAML
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v6
with:
fetch-depth: '0'
- name: Get changed files
id: changed
if: github.event_name == 'pull_request'
uses: step-security/changed-files@v47.0.5
with:
files: 'nspanel_easy_blueprint.yaml'
- name: Set up Python
if: github.event_name != 'pull_request' || steps.changed.outputs.any_changed == 'true'
uses: actions/setup-python@v6.2.0
with:
python-version: "3.11"
- name: Install dependencies
if: github.event_name != 'pull_request' || steps.changed.outputs.any_changed == 'true'
run: pip install -r .github/requirements.txt
- name: Validate nspanel_easy_blueprint.yaml
if: github.event_name != 'pull_request' || steps.changed.outputs.any_changed == 'true'
run: yamllint -c "./.rules/yamllint.yml" nspanel_easy_blueprint.yaml
all-checks-passed:
name: Validate Blueprint YAML / All checks passed
runs-on: ubuntu-latest
needs: code_scan
if: always()
steps:
- name: Check result
run: |
echo "code_scan: ${{ needs.code_scan.result }}"
case "${{ needs.code_scan.result }}" in
success|skipped) exit 0 ;;
*) exit 1 ;;
esac
...