From 8a4f36c1e7d01de663559e915a1b3c8bc0297fa2 Mon Sep 17 00:00:00 2001 From: DakotaLust <106712819+DakotaLust@users.noreply.github.com> Date: Wed, 17 Aug 2022 16:01:43 -0600 Subject: [PATCH 1/2] Create trigger-build-on-edit-approval.yml Created workflow to trigger a build on zkb-sync with event "article-edit-approved". Requires access token before this file can be merged. --- .../trigger-build-on-edit-approval.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/trigger-build-on-edit-approval.yml diff --git a/.github/workflows/trigger-build-on-edit-approval.yml b/.github/workflows/trigger-build-on-edit-approval.yml new file mode 100644 index 0000000000..0488d7f231 --- /dev/null +++ b/.github/workflows/trigger-build-on-edit-approval.yml @@ -0,0 +1,18 @@ +name: Submodule Update Notifications (Approval) + +on: + push: + branches: [ "main" ] + +jobs: + notify-zkb-sync: + name: Article update notification + runs-on: ubuntu-latest + + steps: + - name: Repositiory Dispatch + uses: peter-evans/repository-dispatch@v2.0.0 + with: + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # Need access to secrets to add token + repository: circleci/zkb-sync + event-type: article-edit-approved From fe42971f89ffcdcdd1244f9233f66fe2a32d8f6d Mon Sep 17 00:00:00 2001 From: DakotaLust <106712819+DakotaLust@users.noreply.github.com> Date: Tue, 23 Aug 2022 12:35:44 -0600 Subject: [PATCH 2/2] Update trigger-build-on-edit-approval.yml Update to run workflow on approved PR review --- .github/workflows/trigger-build-on-edit-approval.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/trigger-build-on-edit-approval.yml b/.github/workflows/trigger-build-on-edit-approval.yml index 0488d7f231..0f3c6b002c 100644 --- a/.github/workflows/trigger-build-on-edit-approval.yml +++ b/.github/workflows/trigger-build-on-edit-approval.yml @@ -1,11 +1,13 @@ name: Submodule Update Notifications (Approval) on: - push: + pull_request_review: + types: [submitted] branches: [ "main" ] jobs: notify-zkb-sync: + if: github.event.review.state == 'approved' name: Article update notification runs-on: ubuntu-latest