mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
repository-dispatch custom event to monorepo (#8369)
* repository-dispatch custom event to monorepo * repo owner
This commit is contained in:
26
.github/workflows/package_dispatch.yml
vendored
Normal file
26
.github/workflows/package_dispatch.yml
vendored
Normal 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
|
||||||
|
});
|
||||||
|
|
Reference in New Issue
Block a user