Skip to content

Commit

Permalink
refactor: task separation
Browse files Browse the repository at this point in the history
  • Loading branch information
Nis Jespersen committed Dec 6, 2024
1 parent 5602a1a commit 5f0eb1a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/schema-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,30 @@ jobs:
- name: Prepare working directory
run: mkdir -p docs/schemas

- name: Download and copy JSON schemas
run: |
echo "Download JSON schemas from release payload..."
JSON_SCHEMAS=$(echo '${{ toJson(github.event.client_payload.artefacts.jsonSchemas) }}' | jq -c '.')
for schema in $(echo $JSON_SCHEMAS | jq -c '.[]'); do
FILE_NAME=$(echo $schema | jq -r '.fileName')
URL=$(echo $schema | jq -r '.url')
echo "Downloading $FILE_NAME from $URL..."
curl -L $URL -o "docs/schemas/$FILE_NAME"
done
- name: Download and data model diagram
run: |
echo "Download data model diagram from release payload..."
DATA_MODEL=$(echo '${{ toJson(github.event.client_payload.artefacts.dataModel) }}' | jq -c '.')
DATA_MODEL_FILE_NAME=$(echo $DATA_MODEL | jq -r '.fileName')
DATA_MODEL_URL=$(echo $DATA_MODEL | jq -r '.url')
echo "Downloading data model $DATA_MODEL_FILE_NAME from $DATA_MODEL_URL..."
curl -L $DATA_MODEL_URL -o "docs/schemas/$DATA_MODEL_FILE_NAME"
- name: Download and copy artefacts
run: |
echo "Extracting artefacts from release payload..."
Expand All @@ -44,6 +68,8 @@ jobs:
echo "Downloading data model $DATA_MODEL_FILE_NAME from $DATA_MODEL_URL..."
curl -L $DATA_MODEL_URL -o "docs/schemas/$DATA_MODEL_FILE_NAME"
- name: Commit changes
run: |
git config user.name "github-actions[bot]"
Expand Down

0 comments on commit 5f0eb1a

Please sign in to comment.