Skip to content

Commit

Permalink
disbale internal dispatch (#1634)
Browse files Browse the repository at this point in the history
  • Loading branch information
Haaroon authored Jun 4, 2024
1 parent 3825215 commit 8a59de9
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions .github/workflows/internal_dispatch.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
name: Inform internal projects of raphtory push
on:
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
github-token: ${{ secrets.DISPATCH_PAT }}
script: |
const result = await github.rest.repos.createDispatchEvent({
owner: 'pometry',
repo: '${{ secrets.PROJECT_ONE }}',
event_type: 'raphtory-update',
client_payload: {"update": "master"}
});
// Check the status code of the response
if (result.status !== 204) { // 204 No Content is a typical successful response for dispatch events
console.error('Failed to dispatch the event. Response:', result);
throw new Error('Dispatch event failed'); // Throwing an error will fail the job
}
console.log('Dispatch event was successful:', result);
#name: Inform internal projects of raphtory push
#on:
# push:
# branches:
# - master
#
#jobs:
# release:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/github-script@v6
# with:
# github-token: ${{ secrets.DISPATCH_PAT }}
# script: |
# const result = await github.rest.repos.createDispatchEvent({
# owner: 'pometry',
# repo: '${{ secrets.PROJECT_ONE }}',
# event_type: 'raphtory-update',
# client_payload: {"update": "master"}
# });
#
# // Check the status code of the response
# if (result.status !== 204) { // 204 No Content is a typical successful response for dispatch events
# console.error('Failed to dispatch the event. Response:', result);
# throw new Error('Dispatch event failed'); // Throwing an error will fail the job
# }
# console.log('Dispatch event was successful:', result);

0 comments on commit 8a59de9

Please sign in to comment.