From 31bf7a61234fae75e2b4c3096295da8fd6aaf4d4 Mon Sep 17 00:00:00 2001 From: Roman Dmitrienko Date: Fri, 14 Jun 2024 22:02:20 +0200 Subject: [PATCH] fix: fetch before checking out feature branch --- .github/workflows/publish-bindings-go.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-bindings-go.yaml b/.github/workflows/publish-bindings-go.yaml index 6654d6840..a8ef40682 100644 --- a/.github/workflows/publish-bindings-go.yaml +++ b/.github/workflows/publish-bindings-go.yaml @@ -27,6 +27,7 @@ jobs: git config --global user.name "github-actions" git config --global push.autoSetupRemote true if [ "${{ env.LDK_BRANCH_NAME }}" != "main" ]; then + git fetch git checkout -b ${{ env.TARGET_BRANCH_PREFIX }}${{ env.LDK_BRANCH_NAME }} git pull origin ${{ env.TARGET_BRANCH_PREFIX }}${{ env.LDK_BRANCH_NAME }} || true fi @@ -71,7 +72,7 @@ jobs: git commit -m "Update bindings." if [ "${{ env.LDK_BRANCH_NAME }}" != "main" ]; then - git push origin ${{ env.TARGET_BRANCH_PREFIX }}${{ env.LDK_BRANCH_NAME }} + git push origin ${{ env.TARGET_BRANCH_PREFIX }}${{ env.LDK_BRANCH_NAME }} else - git push origin master + git push origin master fi