Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .github/workflows/publish-schema.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build schema

on:
workflow_dispatch:
push:
branches:
- master
Expand All @@ -14,6 +15,7 @@ jobs:

permissions:
contents: write
pull-requests: write

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -47,14 +49,27 @@ jobs:
- name: Remove intermediate bundle
run: rm -rf build

- name: Commit generated schemas
- name: Open PR for generated schemas
env:
GH_TOKEN: ${{ github.token }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add standard/schema/build/

if git diff --cached --quiet; then
echo "No changes to generated schemas"
else
git commit -m "build: regenerate bundled schemas from fragments"
git push
exit 0
fi

branch="automation/schema-${{ github.run_id }}"
git switch -c "$branch"
git commit -m "build: regenerate bundled schemas from fragments"
git push origin "$branch"

gh pr create \
--repo "$GITHUB_REPOSITORY" \
--base master \
--head "$branch" \
--title "Regenerate bundled schemas" \
--body "Generated from the schema fragments by the Build schema workflow."
10 changes: 5 additions & 5 deletions standard/schema/domainBase.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"x" : { "$ref" : "/schemas/numericSingleValueAxis"},
"y" : { "$ref" : "/schemas/numericSingleValueAxis"},
"z" : { "$ref" : "/schemas/numericAxis" },
"t" : { "$ref" : "/schemas/stringSingleValuesAxis" }
"t" : { "$ref" : "/schemas/stringSingleValueAxis" }
},
"required" : [ "x", "y", "z" ],
"additionalProperties" : false
Expand All @@ -138,7 +138,7 @@
"x" : { "$ref" : "/schemas/numericSingleValueAxis" },
"y" : { "$ref" : "/schemas/numericSingleValueAxis" },
"z" : { "$ref" : "/schemas/numericSingleValueAxis" },
"t" : { "$ref" : "/schemas/stringSingleValuesAxis" }
"t" : { "$ref" : "/schemas/stringSingleValueAxis" }
},
"required" : [ "x", "y" ],
"additionalProperties" : false
Expand Down Expand Up @@ -211,7 +211,7 @@
}
]
},
"t" : { "$ref" : "/schemas/stringSingleValuesAxis" }
"t" : { "$ref" : "/schemas/stringSingleValueAxis" }
},
"required" : [ "composite" ],
"additionalProperties" : false
Expand Down Expand Up @@ -344,7 +344,7 @@
]
},
"z" : { "$ref" : "/schemas/numericSingleValueAxis" },
"t" : { "$ref" : "/schemas/stringSingleValuesAxis" }
"t" : { "$ref" : "/schemas/stringSingleValueAxis" }
},
"required" : [ "composite" ],
"additionalProperties" : false
Expand Down Expand Up @@ -418,7 +418,7 @@
]
},
"z" : { "$ref" : "/schemas/numericSingleValueAxis" },
"t" : { "$ref" : "/schemas/stringSingleValuesAxis" }
"t" : { "$ref" : "/schemas/stringSingleValueAxis" }
},
"required" : [ "composite" ],
"additionalProperties" : false
Expand Down
Loading