-
Notifications
You must be signed in to change notification settings - Fork 40
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 deploy of whatwg.org on changes #131
Conversation
91c3454
to
2a15a65
Compare
This seems to work, https://github.com/whatwg/sg/runs/780908592 triggered https://github.com/whatwg/whatwg.org/runs/780910278 (as @whatbot) |
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.
So the risks here are that if peter-evans/repository-dispatch@v1 goes rogue the DISPATCH_TOKEN is compromised but that cannot really be used for much anyway?
.github/workflows/dispatch.yml
Outdated
name: Dispatch | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: peter-evans/repository-dispatch@v1 |
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.
I guess Dependabot monitors these too?
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.
One can configure Dependabot to bump GitHub Actions, yes. I haven't tried it, though.
An attacker would get write access to the whatwg/whatwg.org repo. From there they should be able to extract the deploy keys to marquee and SSH into it, at which point we'd be pretty thoroughly compromised. That's a fair bit of trust to place in a nice-to-have wrapper. We could pin it to an exact commit, but reviewing changes to https://github.com/peter-evans/repository-dispatch/blob/v1/dist/index.js isn't going to be easy. I'll try to craft the |
OK, after some flailing about I got it to work, https://github.com/whatwg/sg/runs/781040423 triggered https://github.com/whatwg/whatwg.org/actions/runs/138597128. @annevk r? |
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.
Nice! Still pretty heavy for a fetch, but I guess that's what computing is these days. 😊
FWIW, Azure Pipelines has something lighter-weight where no agent at all is required: But GitHub Actions does not, AFAICT. |
Alright, this all seems to work: https://github.com/whatwg/whatwg.org/runs/781299300 |
I did accidentally rebase all the junk commits onto master, though. Disabled branch protection and force pushed to fix. |
Fixes #110.