Skip to content

Commit

Permalink
Add branch-sha input
Browse files Browse the repository at this point in the history
  • Loading branch information
kenodegard committed Dec 13, 2024
1 parent e803a70 commit cef35ef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion prepare-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ inputs:
branch:
description: The target branch to use for the release.
default: ${{ github.event.repository.default_branch }}
branch-sha:
description: The SHA to from which to create the target branch if missing.
default: ${{ github.event.repository.default_branch }}
changelog-author:
description: Git-format author to use for the changelog commits.
default: Conda Bot <[email protected]>
Expand Down Expand Up @@ -34,7 +37,7 @@ runs:
-H "Accept: application/vnd.github+json" \
"/repos/${{ github.repository }}/git/refs" \
-f ref="refs/heads/${{ inputs.branch }}" \
-f sha="$(git rev-parse ${{ github.event.repository.default_branch }})"
-f sha="$(git rev-parse ${{ inputs.branch-sha }})"
fi
git fetch origin
git checkout "${{ inputs.branch }}"
Expand Down

0 comments on commit cef35ef

Please sign in to comment.