Using specific local action #45351
-
Select Topic AreaQuestion BodyHi, I'm trying to set up a Workflow that uses a specific action in my local repository. I was following this tutorial: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-an-action-in-the-same-repository-as-the-workflow My current setup for the directories is the .github folder, followed by two subfolders (actions and workflows). Inside of actions, I have an action.yml and in the workflows I have a main.yml. In my main.yml, if I do
then the workflow runs without issues, but if I do
then I get: Can't find 'action.yml', 'action.yaml', or 'Dockerfile' under '/home/runner/work/repo-name/-repo-name/.github/actions/action'. Am I misunderstanding the tutorial? It seems like the last part of the path shouldn't be a single file but rather another folder (actions/action/action.yml - for example) - but I'm not sure if that's 100% correct. Thanks for any clarification! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I was taking a look at another post which seems to confirm my last part of the post, but I just wasn't sure if I could specifically point the action I want to use instead of nesting it in another subfolder |
Beta Was this translation helpful? Give feedback.
-
Each action needs its own folder, you can't have two actions in one folder. Inside the action folder must be an So if you want to have two actions under |
Beta Was this translation helpful? Give feedback.
Each action needs its own folder, you can't have two actions in one folder. Inside the action folder must be an
action.yml
oraction.yaml
file with the metadata for that action. The path set foruses
must be the one to the folder.So if you want to have two actions under
.github/actions/
, create a subfolder for each.