-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trigger ide.kaitai.io/devel rebuild after NPM publish #1124
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtbandes Thanks for suggesting a possible solution. I don't see much value in using octokit/request-action
though, it looks like a glorified "reimplementation" of curl
in JavaScript. I'd rather use curl
directly, which is a much more common dependency, comes preinstalled (so we don't have to worry about bumping its version once in a while), and is more flexible.
And I'd put the curl
invocation to the trigger-kaitai_struct_webide
script and call the script from the CI workflow config. You can replace its contents - it was only left for reference of how the trigger was done with Travis CI, but we don't use Travis anymore, so it's no longer used.
Updated with curl command adapted from https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#create-a-repository-dispatch-event |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtbandes Thanks! Let's try it in action.
It looks like it should work now. I didn't get it right the first time (I should have done more local testing instead of just assuming things), but https://github.com/kaitai-io/kaitai_struct_webide/actions/runs/10533243030 proves that the CI workflow of So now https://ide.kaitai.io/devel/ should be automatically kept up to date again. |
Triggers the kaitai_struct_webide workflow to re-run (see kaitai-io/kaitai_struct_webide#181) after the NPM publish step.
This will require adding a repository secret to the
kaitai_struct
repo namedKAITAI_STRUCT_WEBIDE_GITHUB_TOKEN
, which should hold a github access token withcontents: write
permissions on thekaitai_struct_webide
repo, allowing it to trigger the workflow. (See more about token permissions on this third-party action's readme.)