repository-dispatch custom event to monorepo (#8369)

* repository-dispatch custom event to monorepo

* repo owner
This commit is contained in:
Maurizio Vitale
2023-03-15 12:00:22 +01:00
committed by GitHub
parent 185e4bc55a
commit 757c0edc52

26
.github/workflows/package_dispatch.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Package published
on:
package:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Dispatch event to monorepo
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const payload = {
package_name: context.payload.package.name,
package_version: context.payload.package.version
};
const octokit = new Octokit();
await octokit.repos.createDispatchEvent({
owner: 'Alfresco',
repo: 'alfresco-apps',
event_type: 'package-published',
client_payload: payload
});