From c9375cf41e093be53e5c1fd69f75bf06bdbb30ad Mon Sep 17 00:00:00 2001 From: Anbraten Date: Wed, 31 Jan 2024 13:46:41 +0100 Subject: [PATCH] adjust release event docs --- docs/docs/20-usage/15-terminiology/index.md | 2 +- docs/docs/20-usage/20-workflow-syntax.md | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/docs/20-usage/15-terminiology/index.md b/docs/docs/20-usage/15-terminiology/index.md index 4e58b9630bc..150865658ce 100644 --- a/docs/docs/20-usage/15-terminiology/index.md +++ b/docs/docs/20-usage/15-terminiology/index.md @@ -38,7 +38,7 @@ - `pull_request`: A pull request event is triggered when a pull request is opened or a new commit is pushed to it. - `pull_request_closed`: A pull request closed event is triggered when a pull request is closed or merged. - `tag`: A tag event is triggered when a tag is pushed. -- `release`: A release event is triggered when a release is created. +- `release`: A release event is triggered when a release, pre-release or draft is created. (You can apply further filters using [evaluate](../20-workflow-syntax.md#evaluate) with [environment variables](../50-environment.md#built-in-environment-variables).) - `manual`: A manual event is triggered when a user manually triggers a pipeline. - `cron`: A cron event is triggered when a cron job is executed. diff --git a/docs/docs/20-usage/20-workflow-syntax.md b/docs/docs/20-usage/20-workflow-syntax.md index a21360a818b..1f9d802488e 100644 --- a/docs/docs/20-usage/20-workflow-syntax.md +++ b/docs/docs/20-usage/20-workflow-syntax.md @@ -757,6 +757,10 @@ when: ### `event` +:::warning +Some events like the release event will be triggered for multiple actions like: releases, pre-releases and drafts. If you want to apply further filters checkout the [evaluate](#evaluate) filter and the available [environment variables](./50-environment.md#built-in-environment-variables). +::: + Execute a step if the build event is a `tag`: ```yaml @@ -783,7 +787,7 @@ Execute a step for all build events: ```yaml when: - event: [push, pull_request, tag, deployment] + event: [push, pull_request, pull_request_closed, tag, deployment, release] ``` ### `ref`