From 55ecc966accab29419c0323621c0b24cee4a976a Mon Sep 17 00:00:00 2001 From: Ben Siggery Date: Wed, 27 Mar 2024 13:16:54 +0000 Subject: [PATCH] chore(pie-monorepo): DSW-1755 add action to trigger aperture --- .github/workflows/trigger-aperture.yml | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/trigger-aperture.yml diff --git a/.github/workflows/trigger-aperture.yml b/.github/workflows/trigger-aperture.yml new file mode 100644 index 0000000000..fee9443388 --- /dev/null +++ b/.github/workflows/trigger-aperture.yml @@ -0,0 +1,33 @@ +name: Trigger Target Workflow + +on: + workflow_dispatch: + inputs: + target_aperture_app: + type: choice + required: true + description: The pie-aperture app to test + options: + - nextjs-app + - nuxt-app + - vanilla-app + +jobs: + trigger: + runs-on: ubuntu-latest + + steps: + - name: Trigger Workflow in PIE Aperture + run: | + repo_owner="siggerzz" + repo_name="pie-aperture" + event_type="trigger-aperture-workflow" + target_aperture_app="${{ github.event.inputs.target_aperture_app }}" + + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/$repo_owner/$repo_name/dispatches \ + -d "{\"event_type\": \"$event_type\", \"client_payload\": {\"target_aperture_app\": \"$target_aperture_app\"}}" \ No newline at end of file