forked from ekeih/libtado
-
Notifications
You must be signed in to change notification settings - Fork 9
46 lines (39 loc) · 1.25 KB
/
check_json_schemas.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
---
name: JSON Schemas
on:
- pull_request
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry tox
poetry export --with=test --without-hashes --format=requirements.txt > requirements.txt
- name: Generate JSON Schemas
run:
tox -e generate_json_schemas
env:
TADO_USERNAME: ${{ secrets.TADO_USERNAME }}
TADO_PASSWORD: ${{ secrets.TADO_PASSWORD }}
TADO_CLIENT_SECRET: ${{ secrets.TADO_CLIENT_SECRET }}
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v20
id: verify-changed-files
with:
files: 'schemas/*.json'
- name: List all changed tracked and untracked files
env:
CHANGED_FILES: ${{ steps.verify-changed-files.outputs.changed_files }}
run: |
echo "Changed files: $CHANGED_FILES"
- name: Fail if files have changed
uses: tj-actions/verify-changed-files@v20
with:
fail-if-changed: true