Skip to content

Private Composite Action cannot checkout current Repository #1300

Description

@rethab

When a private composite action that checks out the current repository is checked out and then run, it always fails.

In other words: Composite actions don't work well together with private actions.

Reproducer

Describe the Bug

When using private actions, it is common to use the checkout action (uses: action/checkout@v2 & specify repository) and then use uses: ./ to trigger them. I'm not aware of a better way to trigger private actions, but please enlighten me if I'm missing something (other than github/roadmap#74).

When this private action happens to be a composite action that checks out itself (by using the checkout action w/o any parameters), then that clears the entire current directory.

While having the entire current directory cleared may be okay for the workflow itself, the "Post" step of the outer workflow expects the action.yml to be present, but that will have been deleted as well.

Error message:

Error: Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/home/runner/work/composite-action-user/composite-action-user/.actions/composite'. Did you forget to run actions/checkout before running your local action?

To Reproduce
Steps to reproduce the behavior:

  1. Checkout a composite action
    • Make sure the composite action includes a uses: actions/checkout@v2
  2. Trigger the (now local) action like so uses: path-to-my-action
  3. The Post step is going to error

Expected behavior
Would be nice if this was somehow possible. Or if passing a working directory to uses would be possible :)

Runner Version and Platform

2.280.3

Ubuntu / self-hosted

@thboop since you wanted to be tagged for issues with composite actions :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions