feat: ic-assets dev mode #5194
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ensure JSON schema docs are up-to-date | |
on: pull_request | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
# When getting Rust dependencies, retry on network error: | |
CARGO_NET_RETRY: 10 | |
# Use the local .curlrc | |
CURL_HOME: . | |
jobs: | |
check: | |
name: json-schema-docs-up-to-date:required | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Check cargo build | |
run: cargo build | |
- name: Show download worked | |
run: cargo run -- --version | |
- name: Check for changes | |
run: | | |
cargo run -- schema --outfile docs/dfx-json-schema.json | |
cargo run -- schema --for networks --outfile docs/networks-json-schema.json | |
cargo run -- schema --for dfx-metadata --outfile docs/dfx-metadata-schema.json | |
cargo run -- schema --for extension-manifest --outfile docs/extension-manifest-schema.json | |
cargo run -- schema --for extension-dependencies --outfile docs/extension-dependencies-schema.json | |
cargo run -- schema --for extension-catalog --outfile docs/extension-catalog-schema.json | |
echo "JSON Schema changes:" | |
if git diff --exit-code ; then | |
echo "(None)" | |
else | |
echo | |
echo "There are code changes in this PR that the JSON schema should reflect," | |
echo "but the JSON schema docs have not been updated." | |
echo | |
echo "Run the above commands locally to update the JSON schema docs." | |
exit 1 | |
fi |