Files
alfresco-ng2-components/.github/workflows/package_dispatch.yml
Giovanni Fertuso 3daecb1b1c [AAE-18117] Use SHA for GitHub actions (#9113)
* AAE-18117 - Add pre-checks job

* AAE-18117 - Use pinned SHA

* AAE-18117 - Update dependabot.yml
2023-11-27 10:58:24 +00:00

30 lines
990 B
YAML

name: Package published
on:
registry_package:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
if: github.event.registry_package.package_type == 'npm' && github.event.registry_package.name == 'adf-core'
steps:
- name: Dispatch event to monorepo
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
with:
github-token: ${{ secrets.PAT_WRITE_PKG }}
retries: 3
script: |
const payload = {
package_name: "${{ github.event.registry_package.name }}",
package_version: "${{ github.event.registry_package.package_version.name }}"
};
await github.rest.repos.createDispatchEvent({
owner: context.repo.owner,
repo: "alfresco-apps",
event_type: "package-published",
client_payload: payload
});
console.log(`Trigger a dispatch event for the monorepo`);