From 5209195bc7512879536e2c26bb441f4180540347 Mon Sep 17 00:00:00 2001 From: Martin Zurowietz Date: Wed, 2 Oct 2024 14:14:09 +0200 Subject: [PATCH] Add schema action Resolves #7 --- .github/workflows/update-schema.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/update-schema.yaml diff --git a/.github/workflows/update-schema.yaml b/.github/workflows/update-schema.yaml new file mode 100644 index 0000000..0936d69 --- /dev/null +++ b/.github/workflows/update-schema.yaml @@ -0,0 +1,22 @@ +name: Update Schema + +on: + push: + branches: + - main + paths: + - 'src/Database/migrations/**' + +jobs: + update-schema: + + runs-on: ubuntu-latest + + steps: + - name: Trigger schema update + run: | + curl -X POST --fail \ + -H "Authorization: token ${{ secrets.BIIGLE_SCHEMA_API_TOKEN }}" \ + -H "Content-Type: application/json" \ + --data '{"event_type": "build_application"}' \ + https://api.github.com/repos/biigle/schema/dispatches