-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.36 KB
/
push.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Note: Used by this GitHub repository.
name: "Check GitHub YAML files"
on:
pull_request:
branches:
- master
push:
branches:
- master
env:
PYTHON_PACKAGES: |
jsonschema==4.9.1
ruamel.yaml==0.17.21
requests==2.27.1
PYTHON_VERSION: 3.9
SLATE_GITHUB_ACTIONS_BRANCHORTAG: master
SLATE_GITHUB_ACTIONS_RAWCONTENT_URL: https://raw.githubusercontent.com/slateci/github-actions
jobs:
checks:
name: Checks
runs-on: ubuntu-20.04
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
fetch-depth: 0
path: ./checkout
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Python packages
uses: BSFishy/pip-action@v1
with:
packages: ${{ env.PYTHON_PACKAGES }}
- name: Download workflow dependencies
run: |-
# Python files
for FILENAME in github-schema-validate.py
do
curl -fsSL ${{ env.SLATE_GITHUB_ACTIONS_RAWCONTENT_URL }}/${{ env.SLATE_GITHUB_ACTIONS_BRANCHORTAG }}/scripts/$FILENAME -o $FILENAME
done
- name: Validate Schemas
working-directory: .
env:
GITHUB_YAML_PATH: './checkout/.github'
run: |-
python github-schema-validate.py