-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.33 KB
/
metadata_automation.yaml
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
name: Metadata Automation
on:
push:
branches:
- '*'
env:
GKE_SA_KEY: ${{ secrets.GKE_SA_KEY }}
ARCGIS_URL: ${{ secrets.ARCGIS_URL }}
ARCGIS_USERNAME: ${{ secrets.ARCGIS_USERNAME }}
ARCGIS_PASSWORD: ${{ secrets.ARCGIS_PASSWORD }}
jobs:
update-metadata:
name: Update metadata from Google Sheets
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python version
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install Python dependencies for actions
run: |-
pip install -r requirements-metadata.txt
- name: Checkout to the head ref
run: |-
git fetch --depth=1
git checkout ${{ github.head_ref }}
- name: Fetch updated metadata from API
run: |-
python3 .github/workflows/scripts/fetch_metadata.py
- name: Update DBT schemas
run: |-
python3 .github/workflows/scripts/metadata_to_dbt_schema.py
- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'Update metadata'
- name: Create/update content on data.rio
if: github.ref == 'refs/heads/master'
run: |-
python3 .github/workflows/scripts/metadata_to_data_rio.py