From 9d3b884e2f416b6e7bb038dba5f24d9228092590 Mon Sep 17 00:00:00 2001 From: Greg Tyler Date: Thu, 9 May 2024 09:34:12 +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 | 21 ++++++++++++++++++++ 2 files changed, 24 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..76a6882a --- /dev/null +++ b/.github/workflows/workflow-schema-deploy.yml @@ -0,0 +1,21 @@ +name: Deploy schema to data dictionary + +on: + pull_request: + branches: + - main + +defaults: + run: + shell: bash + +jobs: + deploy: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Trigger data dictionary deploy + run: gh api -X POST repos/ministryofjustice/opg-data-dictionary/dispatches -f body='{"event_type":"redeploy"}' + env: + GH_TOKEN: ${{ github.token }}