You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the playground-preview workflow is triggered and never will run the build step, because all changes were made to other (than the workflow triggering) files, nothing is uploaded as artifact and so the comment step would output a non-working playground link.
Description of the Change
This PR makes sure the build step runs at least once, when the PR is opened.
Updated Workflow File
The .github/workflows/playground-preview.yml has been adjusted for improved code management.
Job Name Modification
The job previously named check-changes was renamed to needs-build for better clarity.
Reformed Outputs Section
Under the needs-build section, the key src_changed got replaced by run_build. This aims at enhancing the understanding of the code.
Condition Adjustment in 'zip' and 'comment' Jobs
The if condition clause in both the zip and comment jobs have been refined. They now rely on the needs-build output instead of the obsolete check-changes.
Script Update for 'run_build' Variable
The script that sets the run_build variable has been matured. Before, it just checked for changes in the /src/ directory. With this update, the pull request is evaluated to see if it has just been opened alongside changes in the /src/ directory.
Variable Renaming
To maintain consistency and readability in the code, the variable src_changed was renamed to run_build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the playground-preview workflow is triggered and never will run the
buildstep, because all changes were made to other (than the workflow triggering) files, nothing is uploaded as artifact and so thecommentstep would output a non-working playground link.Description of the Change
This PR makes sure the
buildstep runs at least once, when the PR is opened.Closes #Testing & Clean-up after #666, #741, #749 & #750How to test the Change
.github/...or.wordpress-org/...src/...buildstep runs succesfully.includes/...buildstep runs succesfully.src/...buildstep runs succesfully & the comment is updated.includes/...buildstep is skipped & the comment is updated.Changelog Entry
Credits
Props @carstingaxion
Checklist: