Skip to content

Commit a710dd2

Browse files
committed
#develop added repository dispatch (https://github.com/orgs/community/discussions/25702)
1 parent ce57acc commit a710dd2

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.github/workflows/initiate-publish.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,17 @@ jobs:
3535
base: 'main',
3636
head: '${{ github.event.inputs.branch }}',
3737
});
38+
39+
# Push from Action does not trigger subsequent action
40+
# https://github.com/orgs/community/discussions/25702
41+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#repository_dispatch
42+
- name: 🔄 Trigger Publish Workflow
43+
uses: actions/github-script@v7
44+
with:
45+
script: |
46+
github.rest.repos.createDispatchEvent({
47+
owner: context.repo.owner,
48+
repo: context.repo.repo,
49+
event_type: 'publish-trigger',
50+
client_payload: {}
51+
});

.github/workflows/publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ on:
44
push:
55
branches:
66
- main
7-
workflow_dispatch:
7+
repository_dispatch:
8+
types: [publish-trigger]
89

910
concurrency: ${{ github.workflow }}-${{ github.ref }}
1011

0 commit comments

Comments
 (0)