File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Trigger Target Workflow
2+
3+ on :
4+ push :
5+ # Allows you to run this workflow manually from the Actions tab
6+ workflow_dispatch :
7+
8+ jobs :
9+ trigger :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Trigger Workflow in Another Repository
14+ run : |
15+ repo_owner="LabVIEWCommunityTraining"
16+ repo_name="www"
17+ workflow_file="publish-website-on-gh-pages.yml"
18+ branch="main"
19+ json_data="{\"ref\": \"$branch\"}"
20+ curl -L \
21+ -X POST \
22+ -H "Accept: application/vnd.github+json" \
23+ -H "Authorization: Bearer ${{ secrets.WEBSITE_DELIVERY_TRIGGER }}" \
24+ -H "X-GitHub-Api-Version: 2022-11-28" \
25+ https://api.github.com/repos/$repo_owner/$repo_name/actions/workflows/$workflow_file/dispatches \
26+ -d "$json_data"
You can’t perform that action at this time.
0 commit comments