mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
repository-dispatch custom event to monorepo (#8369)
* repository-dispatch custom event to monorepo * repo owner
This commit is contained in:
@@ -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
|
||||||
|
});
|
||||||
|
|
||||||
Reference in New Issue
Block a user