Install the depenedencies:
npm ci
Tests can be ran with:
npm run test
Make sure you have balena-cli installed on your machine and it's authenticated.
To perform a "dry run" of the action without producing any side effects you can do so by copying the env.example file in the event you want to run. Name your copy .env and make sure the modify the input and primary variables.
Once you finish that you can run the action with the following commands:
npm run action:open-pr
npm run action:sync-pr
npm run action:close-pr
npm run action:push
This will run through the entire actions logic except for triggering a build.
To add new events you can just copy the payloads from Github's Webhook events and payloads docs.
If you want to run the action on Github simply push your branch and then create a repository which has a workflow that uses it. For example, make a workflow with a job that uses balena-io/deploy-to-balena-action@<branch-name>
.