-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (35 loc) · 1.35 KB
/
propagate.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
# When updates are merged into main, propagate data model updates to various places:
# 1. dcc-site uses assay, etc. for drop-down options; triggers a workflow in dcc-site that creates a PR to pull in new terms.
# 2. The Synapse schema registry has schemas for the NF entities such as portal studies and datasets. Push updated JSON schemas to the Synapse registry.
#
# Highly related but to be handled by separate workflow:
# Update data model version in DCA-prod for official releases (instead of every merge into main)
name: Propagate data model updates
on:
push:
branches:
- main
paths:
- NF.jsonld
env:
REPO: nf-osi/dcc-site
REF: refs/heads/main
SYNAPSE_AUTH_TOKEN: ${{ secrets.DATA_MODEL_SERVICE }}
jobs:
trigger-sync:
runs-on: ubuntu-latest
steps:
- name: Dispatch update workflow for dcc-site
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Handle data model update
repo: ${{ env.REPO }}
ref: ${{ env.REF }}
token: ${{ secrets.SERVICE_TOKEN }}
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Push to Synapse schema registry only JSON schemas that changed
run: |
CHANGED=$(git diff --name-only HEAD HEAD~1 registered-json-schemas)
.github/workflows/register-schema.sh $CHANGED