Merge pull request #10 from anseljh/main #2
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
| name: WebProtégé Merge | |
| on: | |
| push: | |
| branches: [main] | |
| paths: [FOLIO.owl] | |
| workflow_dispatch: | |
| inputs: | |
| webprotege_zip_url: | |
| description: "URL to a WebProtégé export .zip (optional — uses committed base file if empty)" | |
| required: false | |
| type: string | |
| jobs: | |
| generate-merge: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: pip install -r scripts/requirements.txt | |
| - name: Download WebProtégé export (if URL provided) | |
| if: inputs.webprotege_zip_url != '' | |
| run: curl -L -o webprotege-export.zip "${{ inputs.webprotege_zip_url }}" | |
| - name: Run merge pipeline | |
| run: | | |
| if [ -f webprotege-export.zip ]; then | |
| WP_INPUT=webprotege-export.zip | |
| else | |
| WP_INPUT=FOLIO-webprotege-merge.owl | |
| fi | |
| python scripts/generate_webprotege_merge.py \ | |
| --github-owl FOLIO.owl \ | |
| --webprotege-input "$WP_INPUT" \ | |
| --output FOLIO-webprotege-merge-output.owl \ | |
| --verbose | |
| - name: Upload merge artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: webprotege-merge-${{ github.sha }} | |
| path: FOLIO-webprotege-merge-output.owl | |
| retention-days: 90 |