chore: publish json schemas as release artifacts #932
Workflow file for this run
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: Build and push katsu image | |
on: | |
release: | |
types: [ published ] | |
pull_request: | |
branches: | |
- develop | |
- 'features/**' | |
push: | |
branches: | |
- develop | |
jobs: | |
build-push: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- name: Run Bento build action | |
uses: bento-platform/bento_build_action@v0.11.1 | |
with: | |
registry: ghcr.io | |
registry-username: ${{ github.actor }} | |
registry-password: ${{ secrets.GITHUB_TOKEN }} | |
image-name: ghcr.io/bento-platform/katsu | |
development-dockerfile: bento.dev.Dockerfile | |
dockerfile: bento.Dockerfile | |
# TODO: test, maybe just add to a protected build directory? | |
- name: Make release artifacts | |
run: | | |
./manage.py schema phenopacket >> ./dist/schemas/phenopacket_schema.json | |
./manage.py schema experiment >> ./dist/schemas/experiment_schema.json | |
./manage.py schema discovery >> ./dist/schemas/discovery.json | |
- name: Upload release artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: JSON-schemas | |
path: ./dist/schemas |