-
Notifications
You must be signed in to change notification settings - Fork 38
43 lines (37 loc) · 1.09 KB
/
generate_foreign_keys.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
name: Generate foreign keys
on:
push:
paths:
- '**-foreign-keys.yml'
branches-ignore:
- 'master'
jobs:
generate-foreign-keys:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install Python modules
uses: BSFishy/pip-action@v1
with:
packages: |
pyyaml
pandas
- name: Generate foreign keys
run: python generate_foreign_keys.py
working-directory: ./scripts/json
- name: Check for changes
id: get_changes
run: echo "::set-output name=changed::$(git status --porcelain | wc -l)"
- name: Commit changes
if: steps.get_changes.outputs.changed != 0
run: |
git add -A
git config --global user.email "[email protected]"
git config --global user.name 'github-actions'
git commit -am "Automated commit: Generate foreign keys"
git push