Playground PR Previews as a GitHub App or a generic GitHub action
adamziel opened this issue · 6 comments
Let's make the automatic "PR Preview" comment easy to integrate with any repo:
Currently it's a custom wordpress-develop GitHub workflow. It should be reusable with some manual copy&paste&adjust work. I'd love to turn it into a GitHub App that could be installed in any repo and configured with an artifact name and a default message. It would help many WordPress ecosystem projects.
Here's some inspiration to reuse:
Over the weekend, I was experimenting with Playground blueprints for my personal repos (Icon Block example). I modified a shields.io badge for "Playground Demo" and then linked it to the blueprint in the repo. I like the way it turned out, but a more standardized approach would be cool.

Love it!
I'd love to turn it into a GitHub App that could be installed in any repo and configured with an artifact name and a default message.
My first guess was actually to extract a reusable GitHub Action (which is arguably lower-level and would likely require users to be a bit more experienced). I haven't worked with GH Apps really; is it reasonable to assume that we'd need the action anyway, and the app would be built around it?
@ockham I'm not sure actually! But a reusable action would also go a long way. A GitHub App is an implementation detail, a GitHub link to start a new PR that adds a new yml workflow would be just as good.
@vcanales created a reusable GitHub action here: vcanales/action-wp-playground-pr-preview 🎉 I've filed a few issues that would get us where this issue intended:
@adamziel thanks for creating the issues! Making the action more flexible was definitely in my radar, and this is a great roadmap for that.
There's now a GitHub action for this available in an official WordPress repository: https://github.com/WordPress/action-wp-playground-pr-preview
Let's still keep this issue open until:
