From 624b47bc2fb1550f174c380bc9fa089973ca3167 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Thu, 30 Jan 2025 15:23:22 +0000 Subject: [PATCH] chore(ci): skip cascade if [skip cascade] is found in the PR title (#476) When there are multiple PRs in flight, using a var to disable the cascading PR that eventually runs the end to end tests (for instance because the change is about examples) is error prone. Allowing each pull request to indivudually decide when it is relevant or not is more practical and fine grain. ## Testing Using [an extra commit](https://code.forgejo.org/forgejo/runner/commit/1b8949ed3ada59ab0b1712fd5c3948f996757469) for debuging: - https://code.forgejo.org/forgejo/runner/actions/runs/3328 skips the cascade on this PR - https://code.forgejo.org/forgejo/runner/actions/runs/3326 tries to run the cascade on this PR (and fails because it does not have secrets) because `[skip ZZ cascade]` is set in the title Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/476 Reviewed-by: Michael Kriese Co-authored-by: Earl Warren Co-committed-by: Earl Warren --- .forgejo/workflows/cascade-setup-forgejo.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/cascade-setup-forgejo.yml b/.forgejo/workflows/cascade-setup-forgejo.yml index d44897a..34d0555 100644 --- a/.forgejo/workflows/cascade-setup-forgejo.yml +++ b/.forgejo/workflows/cascade-setup-forgejo.yml @@ -10,7 +10,8 @@ jobs: runs-on: docker container: image: 'code.forgejo.org/oci/node:20-bookworm' - if: vars.CASCADE != 'no' + if: > + ! contains(github.event.pull_request.title, '[skip cascade]') steps: - uses: https://code.forgejo.org/actions/cascading-pr@v2.2.0 with: