forked from wjfrancis/ga-vocabs
-
Notifications
You must be signed in to change notification settings - Fork 4
39 lines (38 loc) · 1.25 KB
/
update_on_merge_nonprod.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
name: Handle updated vocabs Develop
on:
push:
branches: [ develop ]
workflow_dispatch:
jobs:
changes:
runs-on: ubuntu-latest
steps:
- name: Bring in repo - develop branch
uses: actions/checkout@v1
with:
ref: develop
- name: install Python dependencies
run: |
python -m pip install -U pip
pip install -r scripts/requirements.txt
- id: file_changes
uses: trilom/[email protected]
with:
output: ','
- name: detect file changes
env:
DB_USERNAME: ${{secrets.DB_USERNAME}}
DB_PASSWORD: ${{secrets.DB_PASSWORD}}
BASE_DB_URI: ${{vars.BASE_DB_URI_NONPROD}}
WEBSITE_URL: ${{vars.WEBSITE_URL_NONPROD}}
run: |
echo 'Run update script...'
a=${{steps.file_changes.outputs.files_added}}
m=${{steps.file_changes.outputs.files_modified}}
d=${{steps.file_changes.outputs.files_removed}}
r=${{steps.file_changes.outputs.files_renamed}}
if [ -z $a ]; then a="x"; fi
if [ -z $m ]; then m="x"; fi
if [ -z $d ]; then d="x"; fi
if [ -z $r ]; then r="x"; fi
python scripts/update_vocabs.py -a $a -m $m -d $d -r $r