From 5941ec3fa18b56484d27f938c01394e43329a208 Mon Sep 17 00:00:00 2001 From: Jimmy Byrd Date: Thu, 23 May 2024 10:16:25 -0400 Subject: [PATCH] Allow nightly to fail (#1288) --- .../workflows/auto-merge-main-to-nightly.yml | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/auto-merge-main-to-nightly.yml b/.github/workflows/auto-merge-main-to-nightly.yml index 7d30aad9b..cc1cc2e97 100644 --- a/.github/workflows/auto-merge-main-to-nightly.yml +++ b/.github/workflows/auto-merge-main-to-nightly.yml @@ -18,10 +18,21 @@ jobs: with: ref: nightly fetch-depth: 0 # need all history to merge main - + # workaround for allow-failure not existing : https://github.com/orgs/community/discussions/15452#discussioncomment-6012299 - name: Merge main to nightly run: | - git config user.name "GitHub Actions" - git config user.email "actions@github.com" - git merge origin/main -m "merge main to nightly" --no-edit - git push origin nightly + # + set +e + set +o pipefail + + function wrap_command() { + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + git merge origin/main -m "merge main to nightly" --no-edit + git push origin nightly + } + + wrap_command + echo $? + exit 0 +