From 3a42a67a84f976bd674e8e2604b2b979bc309d21 Mon Sep 17 00:00:00 2001 From: Greg Tyler Date: Tue, 14 May 2024 16:16:01 +0100 Subject: [PATCH] Deploy opg-data-dictionary when schemas change To ensure the latest versions are always hosted #patch --- .github/workflows/workflow-pr.yml | 6 +++--- .github/workflows/workflow-schema-deploy.yml | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/workflow-schema-deploy.yml diff --git a/.github/workflows/workflow-pr.yml b/.github/workflows/workflow-pr.yml index 6f68d939..22ca909f 100644 --- a/.github/workflows/workflow-pr.yml +++ b/.github/workflows/workflow-pr.yml @@ -1,9 +1,9 @@ name: PR Workflow on: - pull_request: - branches: - - main + # pull_request: + # branches: + # - main workflow_dispatch: defaults: diff --git a/.github/workflows/workflow-schema-deploy.yml b/.github/workflows/workflow-schema-deploy.yml new file mode 100644 index 00000000..6abb297e --- /dev/null +++ b/.github/workflows/workflow-schema-deploy.yml @@ -0,0 +1,19 @@ +name: Deploy schema to data dictionary + +on: + pull_request: + branches: + - main + +defaults: + run: + shell: bash + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Trigger data dictionary deploy + run: gh api -X POST repos/ministryofjustice/opg-data-dictionary/dispatches -f event_type=redeploy + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }}