0
0
Fork 0
mirror of https://codeberg.org/forgejo/docs.git synced 2024-12-24 22:32:43 -05:00

trigger example

This commit is contained in:
Herwig Hochleitner 2023-06-13 11:56:20 +00:00 committed by Caesar Schinas
parent 4b519bad17
commit 6d786ac835
No known key found for this signature in database
GPG key ID: AE9108461BEA5ACF

View file

@ -49,6 +49,24 @@ The syntax and semantic of the YAML file describing a `workflow` are partially e
Workflows can trigger on certain events. Not everything from https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows is implemented yet. Please refer to the [forgejo/actions package source code](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/modules/actions/workflows.go) and the [list of webhook event names](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/modules/webhook/type.go) to find out about supported triggers.
You can use implemented events to trigger workflows:
```yaml
on:
<event-name>:
<event-parameter>:
...
```
e.g. to run a workflow when branch `main` is pushed
```yaml
on:
push:
branches:
- main
```
## jobs
### runs-on