Beginner Question: How to use actions on a different git repo

Hallo, I just started to play around with Github actions and created successfully my first workflow to build the binaries of a test application (pure github actions (jobs/steps) / yml file, no javascript). I am wondering, if I can make this more generic to get it used by further github repos

like uses: myname/myrepo/MyGenericAction.yml

But all the docs I found refers to javascript templates, but I just want to run an action file on a diffrent repo. Have I missed something or can please someby advice how to achive this.

Cheers

Carsten

1 Like

 

Workflow yml file could not be used in other repos. You must store workflow files in the .github/workflows directory of your repository. Only workflow yml files under .github/workflows directory in the current repo could be recognized by Actions.

As a workaround ,  you can use checkout action to checkout a different repo when run your workflow. Please refer to checkout action README.md:

https://github.com/actions/checkout#checkout-a-different-private-repository