Adopt the Hub-Hosted Validate and Release Chain Tasks - #55
Conversation
Replace validate-task.yml, build-release-task.yml, build-executable-task.yml, build-docker-task.yml, and get-version-task.yml with caller stubs reaching ptr727/ProjectTemplate's hub-hosted reusable workflows, pinned to the 2.0.352 release, per docs/reusable-workflows.md "Adopting the Gates" and "Adopting the Release Chain". test-pull-request.yml moves from a push-all-branches trigger to the hub's release-with-smoke shape (pull_request plus a paths filter). publish-release.yml gains a plan job from publish-plan-task.yml, keeping the existing dispatch-plus-schedule trigger and publish behavior. No repo-specific hook is needed: the vanilla executable and Docker layout matches the hub defaults through inputs alone. Updates the OPERATIONS.md sentence describing the deleted validate-task.yml as hub-owned.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #55 +/- ##
========================================
Coverage 43.37% 43.37%
========================================
Files 28 28
Lines 3896 3896
Branches 306 306
========================================
Hits 1690 1690
Misses 2154 2154
Partials 52 52 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adopts the reusable validation gate and release chain workflows from ptr727/ProjectTemplate (pinned to 2.0.352 / 0b07a59…), replacing the repository’s locally-copied workflow task files. This keeps PhotoCleaner’s CI/release behavior aligned with the hub while reducing duplicated workflow logic.
Changes:
- Replace local reusable workflow tasks with hub-hosted
validate-task.yml,build-release-task.yml, andpublish-plan-task.ymlcallers. - Update PR CI to the “release-with-smoke” shape (PR-triggered + changes filter + workflow status aggregator).
- Update operations documentation to reflect hub-hosted workflow ownership.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| OPERATIONS.md | Updates the repo layout description to reflect hub-hosted validate/release tasks. |
| .github/workflows/test-pull-request.yml | Switches PR CI to hub validate-task and hub build-release-task (smoke) with a changes filter and required-status aggregator. |
| .github/workflows/publish-release.yml | Switches publish flow to hub publish-plan-task, hub validate-task, and hub build-release-task. |
| .github/workflows/validate-task.yml | Deleted (now hub-owned). |
| .github/workflows/build-release-task.yml | Deleted (now hub-owned). |
| .github/workflows/build-executable-task.yml | Deleted (now hub-owned). |
| .github/workflows/build-docker-task.yml | Deleted (now hub-owned). |
| .github/workflows/get-version-task.yml | Deleted (now hub-owned). |
Suppressed comments (1)
.github/workflows/test-pull-request.yml:37
- The paths-filter definition uses only a negated pattern (
!.github/workflows/**). In dorny/paths-filter, a filter with only negated patterns never matches anything, sosteps.filter.outputs.releasewill always befalseand the smoke-build job will never run (even when non-workflow files change). Add an include pattern (e.g.**) and then exclude workflow paths.
filters: |
release:
- '!.github/workflows/**'
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
A workflow_dispatch run of test-pull-request.yml has no pull request to read the changed-files list from, so dorny/paths-filter falls back to a local diff against the default branch, which a shallow checkout could starve of a common ancestor. Raised by the Copilot review on PR #55.
|
Replying to the round-1 Copilot review on "The Suppressed finding, |
… Pilot (#778) ## What - `.github/actions/build-executable-default/action.yml`: the release archive is named for the project file's stem (`./PhotoCleaner/PhotoCleaner.csproj` gives `PhotoCleaner.7z`) unless the new `asset-name` input names it, and `build-release-task.yml` exposes that as `executable_asset_name`. PhotoCleaner's first publish through the task (run 31977092102, release 1.1.11) attached `Console.7z` where its own leaf had attached `PhotoCleaner.7z`, the one regression the pilot found. PlexCleaner names its archive the same way, so the derived default is right for both known callers. - `catalog/snippets/workflows/publish-release.yml` and the doc's byte-identical stub: `permissions: {}` at workflow level, `contents: read` on the `validate` job, the publish job's grants unchanged. These are the four suppressed findings raised on #775 after its clean round. - `docs/reusable-workflows.md` Rollout: PhotoCleaner ticked as the stage 2 pilot (ptr727/PhotoCleaner#55, #56, the validate default-hook path observed) and the stage 4 pilot (smoke run 31974932749 and publish run 31977092102, release 1.1.11), a proof item for the asset-name fix on the next PhotoCleaner release. - `reports/workflow-reuse.md` regenerated: PhotoCleaner 8 workflow files to 3, all three callers, fleet callers 1 to 3. ## Verification actionlint, prose gate, repo gate, audit self-test, unit tests, markdownlint. The asset-name change is proven by the next PhotoCleaner release, recorded as a proof item. Refs ptr727/PhotoCleaner#55, ptr727/PhotoCleaner#56.
Adopts the hub's reusable validate gate and release chain from
ptr727/ProjectTemplate, pinned to release
2.0.352at0b07a59d7c65d07d8df275a96deaf2e06cbefd51, perdocs/reusable-workflows.md"Adopting the Gates" and "Adopting theRelease Chain". This is the stage 2 and stage 4 pilot for PhotoCleaner,
following the stage 1 merge-bot pilot in #53/#54.
Deleted (hub-owned now)
.github/workflows/validate-task.yml.github/workflows/build-release-task.yml.github/workflows/build-executable-task.yml.github/workflows/build-docker-task.yml.github/workflows/get-version-task.ymlInput mapping (no repo-specific hook)
PhotoCleaner's build matches the hub defaults exactly through inputs
alone, so it carries no
.github/actions/build-executableor.github/actions/docker-preparehook:executable_project: ./PhotoCleaner/PhotoCleaner.csproj(hub defaultis
./Console/Console.csproj).docker_image: ptr727/photocleaner, vanilla single-target, nodocker_matrix. The hub default's tag scheme (latest/developplusthe SemVer2 tag) and cache repo match today's copy exactly.
enable_nuget: false,enable_pypi: false(this repo carriesneither leaf, and the hub's default inputs are both
true).(
LABEL_VERSION,BUILD_CONFIGURATION,BUILD_VERSION,BUILD_FILE_VERSION,BUILD_ASSEMBLY_VERSION,BUILD_INFORMATION_VERSION,BUILD_PACKAGE_VERSION) match today'scopy byte for byte, so no
docker-preparehook is needed for themeither.
CODECOV_TOKENis mapped tovalidate-task.ymlin both workflows,and
DOCKER_HUB_USERNAME/DOCKER_HUB_ACCESS_TOKENare mapped tobuild-release-task.yml, all under the namesspec/secrets.jsonalready declares.
Known regression during migration
The hub's
build-release-task.yml/build-docker-task.ymlcore carriesno Docker Hub description push (that becomes
publish-docker-readme-task.ymlin stage 5, perdocs/reusable-workflows.md"The Docker Family"). Adopting the releasechain now, ahead of stage 5, means the Docker Hub overview stops
refreshing on a
mainpublish until PhotoCleaner adopts that task.This is the documented cost of the staged rollout, not an oversight.
Trigger changes
test-pull-request.ymlmoves from apush-to-every-branch triggerto the hub's release-with-smoke shape:
pull_requestto[main, develop]plusworkflow_dispatch, with achangespaths-filter (
!.github/workflows/**) gating the smoke build. Thisalso newly runs CI on a fork's pull request, which the old push
trigger structurally could not.
publish-release.ymlkeeps its exact trigger (workflow_dispatchplus the weekly
main-only schedule) and gains aplanjob(
publish-plan-task.yml) whose publish decision is equivalent totoday's inline
github.ref_name == 'main' || 'develop'guard.Prose
OPERATIONS.md's.github/workflows/bullet is updated to describethe hub-hosted
validate-task.yml/build-release-task.ymlin place ofthe deleted local copies.
README.md,HISTORY.md, and.github/copilot-instructions.mdcarry no mention of the deletedfiles (checked, no edits needed).
WORKFLOW.md,GOVERNANCE.md,CODESTYLE.md, andAGENTS.mdare carried hub content and are notedited here, though
WORKFLOW.md's D1.1/D1.4 notes ("this repo runsno paths filter") are now stale given the new
changesjob; thatstaleness is flagged here rather than fixed, since those four files
are out of scope for this PR.
Review fix
Round 1 flagged that the
changesjob's checkout had nofetch-depth,which could starve
dorny/paths-filter's local diff of a commonancestor on a
workflow_dispatchrun (no PR to read the changed-fileslist from). Fixed in 75b8ce4 with
fetch-depth: 0. A separate,recurring finding that a negation-only filter (
!.github/workflows/**)never matches was declined with evidence: this step uses the action's
default
predicate-quantifier: some, under which a negation-onlyfilter does match, and the PR's own first-push run proves it (see CI
evidence below).
CI evidence
Run https://github.com/ptr727/PhotoCleaner/actions/runs/31974932749
(head
d611355, before the fetch-depth fix) and its75b8ce4rerunboth went green end to end through the hub tasks:
Detect changed targets job(newchangesfilter job):releasecorrectly matched
OPERATIONS.mdand excluded the four deleted plustwo modified
.github/workflows/**files.Validate sources job(hubvalidate-task.yml):Lint sources job,Unit test job, andValidate repository joball passed. Thevalidatejob's hub default hook ran (PhotoCleaner carries no.github/actions/validate), proving the hook-fallback default pathlive for the first time downstream.
Smoke build job(hubbuild-release-task.yml,smoke: true): theinlined
Get version information jobandValidate release version jobran, thenBuild executable jobandResolve Docker build matrix job/Build Docker image jobfordocker.io/ptr727/photocleaner:develop, both through the hub'sbuild-executable-defaultanddocker-prepare-defaultcompositeactions (no repo hooks).
Build NuGet library job,Build PyPI library job, andBuild Docker base image jobcorrectly skipped(
enable_nuget/enable_pypifalse,docker_build_baseunset).Publish GitHub release jobcorrectly skipped (smoke).Check pull request workflow status job(the ruleset-boundaggregator, verbatim): passed.
A real publish through
build-release-task.yml/publish-plan-task.ymlis the maintainer's dispatch or the next weekly schedule after this
merges and promotes, not provable here.
Audit
python3 spec/audit.py PhotoCleaner --branch feature/hub-tasksfromthe hub checkout, at head
75b8ce4:interfacefindings ontest-pull-request.ymlandpublish-release.ymlclear: neither file is reported.DRIFT interface: .github/workflows/build-release-task.yml absent on feature/hub-tasks, cannot verify its contract. The hub's manifest for PhotoCleaner stillexpects a
build-release-task.ymlcaller-graded file to exist; thisdesign instead folds its caller jobs (
smoke-build,publish)directly into
test-pull-request.ymlandpublish-release.yml,matching
docs/reusable-workflows.md"Adopting the Release Chain"("a caller stub in its own
publish-release.yml... nothing herelands as a catalog snippet"). Closing this gap is a hub-side
spec/files.jsonchange, out of scope for this PR since the hub isread-only here.
AGENTS.md,GOVERNANCE.md,CODESTYLE.md,WORKFLOW.md,.github/copilot-instructions.md,.editorconfig,.gitattributes,cspell.json,version.json,repo-config/README.md,AUDIT.md,spec/secrets.json,codecov.yml) is pre-existing hub-canonical drift unrelated to thisPR (the hub has moved on since PhotoCleaner's last resync); none of
those files are touched here.