Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions .github/workflows/notify.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
# runs if /packages/registry/** is updated and the release workflow completes successfully
# Notify the registry API after the release workflow completes successfully.
name: Update Registry Submodules

on:
workflow_run:
workflows: ["Release"]
types:
- completed
push:
paths:
- 'packages/registry/**'

permissions:
contents: write

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] contents: write is the correct minimum for the repository-dispatch REST endpoint — good call declaring it explicitly. Since there's only one job, you could scope it under jobs.notify.permissions instead, so any future job added to this file starts from the default read-only token rather than inheriting write.


jobs:
release:
notify:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success'
if: github.event.workflow_run.conclusion == 'success'

steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch the full history instead of a shallow clone

- name: Delay for 90 seconds to allow NPM package to propagate
- name: Delay for 90 seconds to allow npm package to propagate
run: sleep 90

- name: Update registry API
uses: peter-evans/repository-dispatch@v1
uses: peter-evans/repository-dispatch@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] The v1→v4 bump itself is safe — token, event-type, and client-payload kept the same names across those majors, and this moves off the deprecated Node runtime.

Worth confirming while you're in here, though, whether this step actually notifies anything today. Two things stack up:

  1. No repository input is set, so the dispatch defaults to sei-protocol/sei-js itself — and nothing in .github/workflows/ subscribes to repository_dispatch (types: [workflow_completed]).
  2. GitHub does not start workflow runs from repository_dispatch events created with secrets.GITHUB_TOKEN (line 25). Reaching an external repo would need a PAT anyway, since GITHUB_TOKEN is scoped to this repo.

Both predate this PR, so not a blocker on the diff. But given the PR title is "fix registry notification workflow," it seems worth checking that the registry API is really receiving these — otherwise the fix is polishing a no-op.

with:
token: ${{ secrets.GITHUB_TOKEN }}
event-type: workflow_completed
Expand Down
Loading