-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GHA: Push to main triggers building the website
- Loading branch information
Showing
1 changed file
with
28 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,28 @@ | ||
# Ref: https://medium.com/hostspaceng/triggering-workflows-in-another-repository-with-github-actions-4f581f8e0ceb | ||
# https://docs.github.com/en/rest/about-the-rest-api/api-versions | ||
name: Build WebsiteTrigger Target Workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
trigger: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Trigger Building plotnine.org | ||
run: | | ||
# Set the required variables | ||
repo_owner="has2k1" | ||
repo_name="plotnine.org" | ||
event_type="trigger-workflow" | ||
curl -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.BUILD_PLOTNINE_WEBSITE }}" \ | ||
-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\": {\"unit\": false, \"integration\": true}}" |