66 required : true
77 version_bump_script :
88 description : The version bump script
9- required : true
9+ default : ' '
1010 commit_template :
1111 description : The template for the git commit message
1212 default : " BUMP ${VERSION}"
@@ -21,26 +21,27 @@ runs:
2121 using : composite
2222 steps :
2323 - name : Set new version
24+ if : ${{ inputs.version_bump_script != '' }}
2425 shell : bash -eux {0}
2526 run : |
2627 ${{ inputs.version_bump_script }} ${{ inputs.version }}
2728 - name : Get the commit message
2829 shell : bash -eux {0}
2930 run : |
30- export VERSION=${{inputs.version}}
31- export COMMIT_MESSAGE=$(echo "${{inputs.commit_template}}" | envsubst)
31+ export VERSION=${{ inputs.version }}
32+ export COMMIT_MESSAGE=$(echo "${{ inputs.commit_template }}" | envsubst)
3233 echo "COMMIT_MESSAGE=$COMMIT_MESSAGE" >> $GITHUB_ENV
3334 - name : Commit the version bump
3435 uses : mongodb-labs/drivers-github-tools/git-sign@v2
3536 with :
36- command : git commit -a -m \"${{env.COMMIT_MESSAGE}}\" -s --gpg-sign=${{ env.GPG_KEY_ID }}
37- artifactory_image : ${{inputs.artifactory_image}}
37+ command : git commit -a -m \"${{ env.COMMIT_MESSAGE }}\" -s --gpg-sign=${{ env.GPG_KEY_ID }}
38+ artifactory_image : ${{ inputs.artifactory_image }}
3839 - name : Push the commit to the source branch
3940 shell : bash -eux {0}
4041 run : |
4142 if [ ${{ inputs.push_commit }} == "true" ]; then
4243 git push origin
43- echo "### Pushed version bump: ${{inputs.version}}" >> $GITHUB_STEP_SUMMARY
44+ echo "Pushed version bump: ${{ inputs.version }}" >> $GITHUB_STEP_SUMMARY
4445 else
45- echo "### Created version bump (no push): ${{inputs.version}}" >> $GITHUB_STEP_SUMMARY
46- fi
46+ echo "Created version bump (no push): ${{ inputs.version }}" >> $GITHUB_STEP_SUMMARY
47+ fi
0 commit comments