diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml index 6d2889631..516ae14aa 100644 --- a/.github/workflows/bump_version.yml +++ b/.github/workflows/bump_version.yml @@ -116,17 +116,16 @@ jobs: git config user.name "prosoponator[bot]" git config user.email "dev@prosopo.io" + # checkout the src branch + git fetch --all + git checkout ${{ github.event.inputs.src }} + # check the source branch (e.g. staging) is up-to-date with the dest branch (e.g. main) if [ "$(git rev-list --count origin/${{ github.event.inputs.src }}..origin/${{ github.event.inputs.dest }})" -ne "0" ]; then echo "Source branch ${{ github.event.inputs.src }} is not up-to-date with destination branch ${{ github.event.inputs.dest }}. PR destination branch into the source branch and try again." exit 1 fi - # checkout the src branch - git fetch --all - git checkout ${{ github.event.inputs.src }} - git pull - INTERIM="${{ github.event.inputs.interim}}" # set the interim branch name to release/<version_number> if not provided INTERIM="${INTERIM:-release/${{ github.event.inputs.version }}}"