From f1b7a9cd84284e1afdcedf431f416f05a4811fd5 Mon Sep 17 00:00:00 2001 From: Michele Degges Date: Fri, 16 Dec 2022 09:42:40 -0800 Subject: [PATCH] OSS->ENT merge trigger (#1520) --- .github/workflows/oss-ent-merge-trigger.yml | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/oss-ent-merge-trigger.yml diff --git a/.github/workflows/oss-ent-merge-trigger.yml b/.github/workflows/oss-ent-merge-trigger.yml new file mode 100644 index 000000000..b8aa222d2 --- /dev/null +++ b/.github/workflows/oss-ent-merge-trigger.yml @@ -0,0 +1,25 @@ +name: Trigger OSS to Enterprise Merge +on: + pull_request_target: + types: + - closed + branches: + - main + +jobs: + trigger-oss-merge: + # Run this only on merge events in OSS repo + if: ${{ github.event.pull_request.merged && github.repository == 'hashicorp/boundary-ui' }} + runs-on: ubuntu-latest + steps: + - name: Trigger Merge + env: + GIT_REF: ${{ github.ref_name }} + GIT_SHA: ${{ github.sha }} + GH_PAT: ${{ secrets.ELEVATED_GITHUB_TOKEN }} + GIT_ACTOR: ${{ github.actor }} + run: | + curl -H "Authorization: token $GH_PAT" \ + -H 'Accept: application/json' \ + -d "{\"event_type\": \"oss-merge\", \"client_payload\": {\"git-ref\": \"${GIT_REF}\", \"git-sha\": \"${GIT_SHA}\", \"git-actor\": \"${GIT_ACTOR}\" }}" \ + "https://api.github.com/repos/hashicorp/boundary-ui-enterprise/dispatches" \ No newline at end of file