Skip to content

Commit

Permalink
fix: dupes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nis Jespersen committed Dec 11, 2024
1 parent e97f269 commit 2378457
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions .github/workflows/schema-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
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')
Expand All @@ -37,39 +36,15 @@ jobs:
- 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..."
# Download JSON schemas
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
# Download data model
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: Commit changes
run: |
git config user.name "github-actions[bot]"
Expand Down

0 comments on commit 2378457

Please sign in to comment.