Skip to content

Commit 8fe068b

Browse files
authored
repository_dispatch
1 parent 7598ce0 commit 8fe068b

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/manual.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,16 @@ jobs:
3232
cd .github/workflows/
3333
pwd
3434
cat ./"${{ inputs.file }}"
35+
36+
37+
# to run from cli --- gh workflow run manual.yml -f name=vikram -f file=sample.txt
38+
# via api
39+
#curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $GITHUB_TOKEN" https://api.github.com/repos/2vikram22/Github-Examples/actions/workflows/manual.yml/dispatches -d '{
40+
# "ref": "main",
41+
# "inputs": {
42+
# "name": "vikram",
43+
# "file": "sample.txt"
44+
# }
45+
# }'
3546

3647

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "repoitory_dispathc"
2+
3+
on:
4+
repository_dispatch:
5+
types:
6+
- webhook
7+
- web2
8+
9+
jobs:
10+
job1:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: to print the event
15+
run: echo "event is ${{ github.event_name }}"
16+
17+
18+
19+
20+
21+

0 commit comments

Comments
 (0)