From a519aa73cf5b3565849e4c10bb60f7e2a31fe3e1 Mon Sep 17 00:00:00 2001 From: McCloudS <64094529+McCloudS@users.noreply.github.com> Date: Thu, 6 Feb 2025 10:43:57 -0700 Subject: [PATCH] Update calver.yml --- .github/workflows/calver.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/calver.yml b/.github/workflows/calver.yml index 8f76712..b9afd80 100644 --- a/.github/workflows/calver.yml +++ b/.github/workflows/calver.yml @@ -16,9 +16,7 @@ jobs: - name: Checkout code uses: actions/checkout@v3 with: - # Fetch the full history fetch-depth: 0 - ref: main - name: Calculate version id: version @@ -44,8 +42,12 @@ jobs: git add subgen.py git commit --amend --reuse-message=HEAD --author="${GIT_AUTHOR_NAME} <${GIT_AUTHOR_EMAIL}>" - # Pull any remote changes - git pull --rebase origin main # Use --rebase to avoid a merge commit + # Pull and rebase. Handle potential conflicts. + git pull --rebase origin main || { + echo "Rebase failed! Resolving conflicts..." + git rebase --abort # Abort the rebase + exit 1 # Fail the job (optional) + } # Push the amended commit git push origin HEAD:main