Reputation: 63
Issue:
Pulling a private repo that contains several actions will fail in the POST phase with error message:
Error: Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/home/runner/work/testjerome/testjerome/.github/actions/package_and_push_to_ECR'. Did you forget to run actions/checkout before running your local action?
Example to reproduce it:
- name: Check out main repository
uses: actions/checkout@v2
- name: Get composite run steps repository
uses: actions/checkout@v2
with:
repository: myorg/myaction
# Select revision
ref: v1.0.0
# Personal access token to check out private repository
token: ${{ secrets.PAT_TOKEN }}
# Indicate where to check action out to
path: .github/actions
- name: Run action from private repo
uses: ./.github/actions/myAction
This example assumes that "myorg/myaction" is a private github repo with 1 folder having 1 file like this: myAction/action.yml
Question:
Would any one know how to avoid that issue, while still having several actions in a repo ? (yes, I could create 1 repo per action ... but this is going to be messy)
References:
This is a follow up from the comments from How do you use a composite action that exists in a private repository?
As well as this github issue (can't find the issue itself in github): https://githubmemory.com/repo/actions/runner/issues/1300
Someone did setup a reproducible example: https://github.com/rethab/composite-action-user
Upvotes: 2
Views: 1364
Reputation: 63
Ignore the question - found the github issue link: https://github.com/actions/runner/issues/1300
I'll wait until someone helps there
Also, as the issue is "because we do a checkout action in the remote action", the workaround I'm now using is:
Upvotes: 1