ci: deploy to dist from the release workflows - #543
Open
enricobattocchi wants to merge 1 commit into
Open
Conversation
A push made with the built-in Actions token raises no events, so the tag push in `Release` and `Release RC` never started `Deploy` and the dist repository stopped receiving released code and tags. Give `deploy.yml` a `workflow_call` trigger and call it from both release workflows after the tag push. The ref to build, the release flag and the source commit metadata now come from inputs and from the checked-out ref instead of the push event payload, since a called run has no push payload. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Coverage Report for CI Build 34480703200Warning No base build found for commit Coverage: 62.83%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Context
ReleaseandRelease RCpush their tag with the built-in Actions token. GitHub raises no events for pushes made with that token, so the tag push never startedDeployandYoast-dist/duplicate-poststopped receiving released code. The dist repository has no4.7tag, while4.6,4.6-RC1and4.6-RC2are all still there from when tags were pushed by hand.Summary
This PR can be summarized in the following changelog entry:
Deploy to distjob to theReleaseandRelease RCworkflows, so a released tag reachesYoast-dist/duplicate-postagain.Relevant technical choices:
deploy.ymlgains aworkflow_calltrigger with arefinput and anis-releaseinput, and both release workflows call it after the tag push withsecrets: inherit. A reusable workflow can only be called as a job, so the dist deploy runs as a follow-up job after the release job finishes.YOASTBOT_CI_KEYdeploy key, or add a token with write access for this repository.workflow_callneeds no extra secret and keeps the dist deploy visible inside the release run.deploy.ymlno longer reads that payload for everything: the ref to build and the release flag come from the inputs (DEPLOY_REF_NAME,IS_RELEASE), and the source commit sha, time and message come from thepreparejob, which reads them from the checked-out ref.Deployruns: a run against a tag ref now takes the release path instead of creating a dist branch named after the tag, and the dist commit gets a real committer, message, timestamp and commit link instead of empty fields.Deploy to distjob is skipped there. That also means theworkflow_callpath cannot be rehearsed; the first real exercise is the next RC or release.Release RCjob exposes the computed RC version as a job output, because the caller has to pass the tag name to build.Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
actionlint1.7.12 passes on the whole.github/workflows/directory. No PHP or JavaScript changed, so the PHP and Grunt checks have nothing to check here.composer lintandcomposer check-branch-cspass locally; the localcomposer testrun cannot complete because the installeddoctrine/instantiatorneeds PHP 8.4 or newer, so the unit suite is covered by CI on this PR.Release RC, run it from this branch withversion=99.0anddry-run=true. Confirm the run is accepted and completes, thatDeploy to distis skipped, and that the dry-run summary lists the dist deploy among the steps it would have taken. A dry run does not exercise the deploy itself; theActionlintCI job is what checks the call againstdeploy.ymland its inputs.Deployand run it against the4.7tag. Confirm the run syncs to the distmainbranch with a commit titledRelease 4.7, and thatYoast-dist/duplicate-postends up with the4.7tag it is missing.Relevant test scenarios
Test instructions for QA when the code is in the RC
QA can test this PR by following these steps:
Release RCrun that produces the RC is itself the test: confirm it ends with aDeploy to distjob that pushes the RC tag toYoast-dist/duplicate-post.Impact check
This PR affects the following parts of the plugin, which may require extra testing:
Deployworkflow is shared with pushes totrunk,release/*,hotfix/*andfeature/*, so the first push to one of those after merge is worth a look: it should still sync to a same-named dist branch with aSyncing branch ...commit.UI changes
Documentation
The header comment in
release.ymlclaimed the tag push triggersdeploy.yml. It is corrected, and both release workflow headers now describe the dist deploy and why the tag push cannot start it.Quality assurance
Innovation
innovationlabel and noted the work hours.Fixes #542