Repository navigation
Conversation
bb8104c to
6b80db5
Compare
| uses: redhat-developer/rhdh-plugin-export-utils/.github/workflows/export-dynamic.yaml@main | ||
| # Relative path keeps export-dynamic in lockstep with this workflow's ref | ||
| # (needed for new inputs like prepare-downstream-sources; avoids @main drift). | ||
| uses: ./.github/workflows/export-dynamic.yaml |
There was a problem hiding this comment.
Are you sure this work form reusable workflows (at call side in the overlay) ?
There was a problem hiding this comment.
Thanks David when overlays call this reusable workflow, a nested ./ can resolve against the top level or root caller repo (overlays), not utils.
Switched to $/.github/workflows/export-dynamic.yaml (same-repo, same commit as this workflow): https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows
We need lock it on some SHA rather than @main because this PR adds prepare-downstream-sources on both files; pinning the nested call at @main would reject that input until both are merged.
Validated end-to-end locally, I will test it our from overlays once this lands on main.
There was a problem hiding this comment.
Follow-up after GHA retest on this PR head:
uses: cannot take github.* expressions, so prepare-sources now follows the same pattern as the compatibility helpers: checkout redhat-developer/rhdh-plugin-export-utils at ${{ github.job_workflow_sha }} into _export-utils-prepare-sources, then uses: ./_export-utils-prepare-sources/prepare-sources. Nested workspaces→dynamic stays on $/ so overlays don't resolve ./ against themselves.
Harness (fork dispatch → nested $/ → export-dynamic → prepare-sources → artifact):
- flat
workspaces/apiconnect: https://github.com/polasudo/rhdh-plugin-export-utils/actions/runs/36850630581 ✅ (prepared downstream sources artifact uploaded) - non-flat
workspaces/topology: https://github.com/polasudo/rhdh-plugin-export-utils/actions/runs/36850634537 ✅
Ready for another look when you have a moment.
…tream-sources Add optional post-export steps in export-dynamic that invoke the prepare-sources action with workspace/overlay paths derived from plugins-root (flat vs non-flat) and upload the prepared tree as a workflow artifact until construct-artifact lands. Pass the new input through export-workspaces-as-dynamic; default false keeps existing export behavior unchanged (RHIDP-15846). Co-authored-by: Cursor <cursoragent@cursor.com>
Same-repo reusable call so we can exercise RHIDP-15846 path wiring on topology/backstage without depending on cross-fork workflow_call (startup_failure). Co-authored-by: Cursor <cursoragent@cursor.com>
Pinning the nested reusable workflow to @main dropped new inputs such as prepare-downstream-sources and caused caller startup_failure. Same-repo relative uses keeps both workflows on the same ref. Co-authored-by: Cursor <cursoragent@cursor.com>
upload-artifact rejects paths ending in "/." which is what we built for flat workspaces (plugins-root=.). Resolve "." to source-repo before invoking prepare-sources and uploading the artifact. Co-authored-by: Cursor <cursoragent@cursor.com>
Nested "./" can resolve against the top-level overlays caller. Use "$/" so export-dynamic stays on the same commit as export-workspaces when called as a reusable workflow (RHIDP-15846). Co-authored-by: Cursor <cursoragent@cursor.com>
@main pulls setup-vp cache hashing that fails under _actions/. Use a same-repo relative action path and turn off the lockfile cache so prepare-downstream-sources can run from export-dynamic (RHIDP-15846). Co-authored-by: Cursor <cursoragent@cursor.com>
8e5b566 to
8527150
Compare
Relative ./prepare-sources looks in the job workspace (source/overlay checkouts), not utils. Pin the composite action to this workflow's commit and keep setup-vp cache off so lockfile hashing under _actions succeeds. Co-authored-by: Cursor <cursoragent@cursor.com>
GitHub rejects github.* in uses:; mirror the compatibility-helpers pattern — checkout utils at this workflow commit, then run the local composite action. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Replace the runtime checkout of this repository at github.job_workflow_sha with the documented $/ self repository reference, which resolves to the workflow file's repository at the running commit without a checkout step. This removes the dynamic ref that tripped the SonarCloud action-pinning alert — the reference is commit-locked by definition — and follows the GitHub-recommended syntax for same-repository actions.
|



Summary
prepare-downstream-sources(boolean, defaultfalse) toexport-dynamic.yamland passes it throughexport-workspaces-as-dynamic.yaml.prepare-sourceswith:--workspace-path=source-repo/${{ plugins-root }}(.for flat,workspaces/<name>for non-flat)--overlay-path=overlay-repo/${{ overlay-root }}prepared downstream sources…) untilconstruct-artifact(RHIDP-15845) can publish OCI.falseleaves existing export behavior unchanged.Test plan
prepare-downstream-sources: false(or omit) — confirm no prepare/upload steps runprepare-downstream-sources: true, confirm CLI gets…/source-repo/workspaces/topology+ overlay path, artifact uploads…/source-repo/.(or…/source-repo) + overlay pathResolves RHIDP-15846
Made with Cursor