From 24f5bd4e3cabbc2b4dcec2b4a9b58a2ccce924bf Mon Sep 17 00:00:00 2001 From: Jakub Panek Date: Mon, 2 Sep 2024 12:17:20 +0200 Subject: [PATCH] ci: don't run merge check on release branch + cleanup --- .forgejo/workflows/merge-main-check.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.forgejo/workflows/merge-main-check.yml b/.forgejo/workflows/merge-main-check.yml index c95b1c0..687b4dc 100644 --- a/.forgejo/workflows/merge-main-check.yml +++ b/.forgejo/workflows/merge-main-check.yml @@ -13,14 +13,9 @@ defaults: jobs: check: + name: Check if non-staging -> main runs-on: shell - if: github.base_ref == 'main' + if: github.base_ref == 'main' && !startsWith(github.ref, 'refs/heads/release/') && github.head_ref != 'staging' steps: - name: Check if non-staging -> main - if: github.head_ref != 'staging' run: echo 'Cannot merge non-staging branch to main'; exit 1 - - - name: Check if staging -> main - if: github.head_ref == 'staging' - run: echo 'Merge from staging branch to main allowed'; exit 0 -