-
Notifications
You must be signed in to change notification settings - Fork 43
Add new GitHub Action workflows to support WordPress Playground previews #46
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
Add new GitHub Action workflows to support WordPress Playground previews #46
Conversation
…ready exists in the PR that links to playground and if not, will add a new link that has our custom blueprint within it
…ly change location for testing
| "plugin-zip": "wp-scripts plugin-zip", | ||
| "build": "echo 'Building...'", |
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.
Adding these two scripts and installing @wordpress/scripts are the only changes here from what is currently in #38, just as an FYI for reviewers
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.
Also worth noting we don't have anything to build yet so the actual build script here will need to be updated once we have something to build (like JS or CSS files)
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| # Builds the plugin ZIP file. | ||
| build-plugin-zip: | ||
| name: Build plugin zip | ||
| uses: ./.github/workflows/build-plugin-zip.yml |
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.
GitHub supports a few options for calling a reusable workflow:
{owner}/{repo}/.github/workflows/{filename}@{ref}./.github/workflows/{filename}
I've gone with the second option here but can update it to the first if we think that's better. The one benefit there is we can specify a specific commit hash, similar to how we call 3rd party workflows, if we're concerned with the security of that workflow.
Because this workflow lives in the same repo, didn't seem like we needed to go that far but it's an easy update if desired:
WordPress/ai/.github/workflows/build-plugin-zip.yml@{commit SHA}
jeffpaul
left a comment
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.
Some questions and suggestions, but nothing that's truly blocking to merge this in and we can iterate as we go
…ayground-workflow
…r/ai into dev/wordpress-playground-workflow
|
#38 has been merged now, need to resolve conflicts here and then merge |
Description of the Change
As detailed in #41, this PR adds two new GitHub Action workflows:
The way this works is the following:
Pull Request CommentsworkflowBuild Plugin Zipworkflow. This workflow builds the plugin and uploads it as an artifact to the PRPull Request Commentsworkflow will continue.WordPressorganization, so this part hasn't been tested yetCloses #41
Note
This PR contains
.gitignore,composer.json,composer.lock,package.jsonandpackage-lock.jsonfiles that were copied over from #38, since that PR isn't merged yet. A few minor changes were made topackage.jsonto support the build process but everything else matches that PRHow to test the Change
I was hoping the workflow would run properly on this PR but I think do to this being opened from a fork, it doesn't work.
All of this has been tested on my forked repo, though as noted there in the final step, the Playground link doesn't work properly as my repo isn't within a supported organization. But if desired, can see how things worked there:
Not sure there's a better way to test without merging this in :(