forked from justeattakeaway/pie
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from siggerzz/dsw-1755-trigger-aperture-from-pie
chore(pie-monorepo): DSW-1755 add action to trigger aperture
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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\"}}" |