2026.01.R1 updates #84
Workflow file for this run
This file contains hidden or 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
| # This workflow is used to convert changed ark.model.csv to ark.model.jsonld | |
| # and push the updated ark.model.jsonld to feature branch | |
| name: ci-schema-convert | |
| on: | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'ark.all_attributes.csv' | |
| - '.github/workflows/ci-schema-convert.yml' | |
| - 'utils/**' | |
| - 'model_contexts/**' | |
| env: | |
| SCHEMATIC_VERSION: 24.11.2 | |
| SCHEMATIC_SERVICE_ACCOUNT_CREDS: ${{ secrets.SCHEMATIC_SERVICE_ACCOUNT_CREDS }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | |
| fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
| # Set up supported python. | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10.12' | |
| - name: Install Python Packages | |
| run: | | |
| pip install schematicpy==${{ env.SCHEMATIC_VERSION }} | |
| pip show schematicpy | |
| - name: Create creds file | |
| run: | | |
| echo "${SCHEMATIC_SERVICE_ACCOUNT_CREDS}" > schematic_service_account_creds.json | |
| - name: Create context-specific models | |
| run: | | |
| python utils/context_specific_models.py | |
| - name: convert model csv to jsonld | |
| run: | | |
| bash utils/schema_convert.sh | |
| - name: Generate templates | |
| run: | | |
| bash utils/generate_model_templates.sh | |
| - name: Generate blank CSV templates from json schema to support dictionary site build | |
| run: | | |
| python utils/generate_csv_templates.py | |
| - name: delete BDM-specific json schema files | |
| run: | | |
| rm model_json_schema/ark.BDM* | |
| - name: Clean up sensitive info | |
| run: | | |
| rm schematic_service_account_creds.json | |
| - name: Commit files if there are changes | |
| run: | | |
| git status | |
| if [[ $(git status -z) ]]; then | |
| echo "Changes to model(s) identified and will be committed" | |
| git config --local user.name "$GITHUB_ACTOR" | |
| git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
| git add -A | |
| git commit -m "GitHub Action: commit results of ci-schema-convert workflow" | |
| else | |
| echo "No changes to model(s) identified. Nothing to commit." | |
| fi | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: ${{ github.event.pull_request.head.ref }} #The name of the branch being merged into main | |
| force: true |