An example of creating a local github action:
In this repo:
- .github/workflows/actions/helloworld - example action
- .github/workflows/actions/helloworld-workflow.yml - example workflow which uses the action
For more information see Create your own local js GitHub Action with just two files