ngx-admin/.github/workflows/ACTION_TRIGGER_GUIDE.md
azaiko-akveo 2f76eab493 feat(deploy): demo enable gh actions manual trigger (#5932)
* feat(deploy): enable manual triggering

* fix(deploy): use the default azure/CLI version

* doc(deploy): update action trigger guid

* feat(deploy): enable manual triggering for docs

Co-authored-by: artem.zaiko.ext <artem.zaiko.ext@munichgeneral.com>
2023-10-29 17:10:16 +01:00

18 lines
892 B
Markdown

### Actions deploy guide
In order to trigger workflow action you should execute the following curl ([docs](https://docs.github.com/en/rest/actions/workflows#create-a-workflow-dispatch-event)):
```
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token <ACCESS_TOKEN>" \
https://api.github.com/repos/akveo/ngx-admin/actions/workflows/<WORKFLOW_ID>/dispatches \
-d '{"ref":"<REF>","inputs":{"name":"Mona the Octocat","home":"San Francisco, CA"}}'
```
Parameters:
- `WORKFLOW_ID` - the workflow id or its file name (e.g. `azureCliDeploy.yml`)
- `ACCESS_TOKEN`: A personal access token. Creating a [personal access token guide](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)
- `REF`: Required. The git reference for the workflow. The reference can be a branch or tag name. ('demo')