iFit's central repository for Github actions
- Copy
example.yml
to${your-project}/.github/workflows
- Rename and edit as desired (or use it exactly as is).
- Add any necessary secrets to your repository (if using
pr-to-master
you need to add theGITHUB_API_TOKEN
which you can find in 1password).
To add a new action, use the pr-to-master
folder as an example. Just creating a copy of this is probably the easiest way to get started.
- Create a new folder in the root of the project. The name of your folder will be the name of your action.
- In the new directory create an
action.yml
file. This is your action definition and will include things like description and inputs. - Create your
${action-name}.ts
file. - Add a build command to
package.json
. Javascript that is executed as an action needs to be bundled with all its dependencies.