Skip to content

(fix): Fix nested action outputs - #27

Merged
Ompragash merged 3 commits into
drone-plugins:mainfrom
franciscojuniorharness:fix-nested-action-outputs
Aug 20, 2026
Merged

(fix): Fix nested action outputs#27
Ompragash merged 3 commits into
drone-plugins:mainfrom
franciscojuniorharness:fix-nested-action-outputs

Conversation

@franciscojuniorharness

Copy link
Copy Markdown
Contributor

Summary

  • Output discovery only looked at the cloned repo root action.yml, so path-based actions (owner/repo/path/to/action@ref) never exported outputs to Harness.
  • ParseLookup now returns the action subdirectory, and we resolve <clone>/<path>/action.yml (with path-traversal guards). Root-level actions are unchanged.
  • Fixes nested composite wrappers (e.g. .github/actions/...) that run successfully but leave Harness output variables empty (No output variables detected in action.yml; skipping output file generation.).
  • Pins the plugin base image from floating docker:dind to docker:29.6.0-dind to avoid Docker 29.7.0 CopyToContainer regression (path escapes from parent under /var/run/act).
  • Adds unit coverage for nested path discovery and ActionDir traversal cases that only escape after filepath.Clean.

Test plan

  • Unit tests for root vs nested uses, nested outputs, missing nested action.yml soft-fail, and path-traversal rejection
  • Verified via Docker: docker run --rm -v "$PWD":/src -w /src golang:1.22.7 go test ./... -count=1 -v
  • Built temp image and validated nested action in Harness (fjunior87/ci-py-test/.github/actions/sample-tag@main)
    • Logs show Path: .github/actions/sample-tag
    • output variables step runs
    • Harness step outputs populated (new_tag, new_version)
  • Confirmed old plugins/github-actions:latest fails the same nested repro (empty outputs)
  • Validated root action (mathieudutour/github-tag-action@v6.2) with pinned DinD base — no path escapes from parent failure; outputs exported

Parse action.yml from the subdirectory in uses (owner/repo/path@ref)
so path-based composite actions export outputs to Harness.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid Docker 29.7.0 CopyToContainer regression that breaks act
when copying actions under /var/run/act.
Co-authored-by: Cursor <cursoragent@cursor.com>

@OmpragashOmpragash left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. confirmed the nested action exports

@Ompragash
Ompragash merged commit 51890bb into drone-plugins:mainAug 20, 2026
2 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@franciscojuniorharness@Ompragash