Separate GitHub action file and workflow file
During GitHub Workflow action writing yaml file and usually we use run
to run some action in same file as below
I have my own action lint the markdown files and using own config file for that; so there was no need to call uses
from existing action so use run
which works fine
First Version
adding .markdownlint.json
file near this file
Final Version
We can also separate the action completely and call the file using uses
in place of run
Action file
created separate actions folder inside .github
folder and create a file name action.yml under one file which is called from file in workflows folder
Notes
- we can use
\
writing a long command in multiline - filename must be
action.yml
’ this is default file under a folder so no need to mention while calling - move
./.markdownlint.json
inside md-lint folder
Workflow File
This is how it is called inside workflows
References
- Thanks to this Stack overflow Answer