From 525809dc3bd73ace969b046062967796035f4d86 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Thu, 15 Feb 2024 19:06:04 +0000 Subject: [PATCH] Per suggestion from @JohnHalleyGotway, create intermediate branch for updating truth data to avoid branch protection rules. I added a step to delete the intermediate branch locally if it exists to prevent conflicts with the update --- .github/workflows/update_truth.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_truth.yml b/.github/workflows/update_truth.yml index 4b8c310dd7..398dcd5a8b 100644 --- a/.github/workflows/update_truth.yml +++ b/.github/workflows/update_truth.yml @@ -45,10 +45,14 @@ jobs: git config --global user.email "97135045+metplus-bot@users.noreply.github.com" echo git checkout ${branch_name} git checkout ${branch_name} + echo git checkout -d update_truth_for_${branch_name} (delete local if exists) + git checkout -d update_truth_for_${branch_name} + echo git checkout -b update_truth_for_${branch_name} (create from ${branch_name}) + git checkout -b update_truth_for_${branch_name} echo git merge -s ours origin/${branch_name}-ref git merge -s ours origin/${branch_name}-ref - echo git push origin ${branch_name} - git push origin ${branch_name} + echo git push origin update_truth_for_${branch_name} + git push origin update_truth_for_${branch_name} - name: Create Pull Request run: gh pr create --base $BASE --body "$BODY" --title "$TITLE"