Skip to content

Commit

Permalink
fix: dispatch workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
devpow112 committed May 2, 2024
1 parent 501cb35 commit 8822456
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,18 @@ jobs:
with:
github-token: ${{secrets.REPOSITORY_DISPATCH_TOKEN}}
script: |
await github.rest.repos.createDispatchEvent({
owner: 'Brightspace',
repo: 'test-reporting-action',
event_type: 'test-reporting-node-release'
});
const targets = [
'test-reporting-action',
'test-actions'
];
const results = await Promise.allSettled(targets.map(target =>
github.rest.repos.createDispatchEvent({
owner: 'Brightspace',
repo: target,
event_type: 'test-reporting-node-release',
})
));
console.log(results);
if (results.some(r => r.status === 'rejected')) {
throw new Error('Not all dispatches succeeded. See details above.');
}

0 comments on commit 8822456

Please sign in to comment.