Skip to content
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

Merged
merged 6 commits into from
Aug 23, 2024

Conversation

jtbandes
Copy link
Contributor

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 named KAITAI_STRUCT_WEBIDE_GITHUB_TOKEN, which should hold a github access token with contents: write permissions on the kaitai_struct_webide repo, allowing it to trigger the workflow. (See more about token permissions on this third-party action's readme.)

Copy link
Member

@generalmimon generalmimon left a 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.

@jtbandes
Copy link
Contributor Author

Copy link
Member

@generalmimon generalmimon left a 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.

@generalmimon generalmimon merged commit 107fe14 into kaitai-io:master Aug 23, 2024
1 check failed
@jtbandes jtbandes deleted the trigger-webide branch August 23, 2024 22:57
@generalmimon
Copy link
Member

generalmimon commented Aug 24, 2024

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 kaitai_struct_webide was successfully triggered from https://github.com/kaitai-io/kaitai_struct/actions/runs/10533223574/job/29188839941#step:6:10. Although the triggered CI run didn't actually update the compiler and runtime to latest versions (note that there is no update for either in kaitai-io/ide-kaitai-io.github.io@dd70c74), it appears that I finally fixed this in kaitai-io/kaitai_struct_webide@2b6cfd5 - see kaitai-io/ide-kaitai-io.github.io@5fb4dac.

So now https://ide.kaitai.io/devel/ should be automatically kept up to date again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants