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 4d32b26
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions prepare-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ inputs:
branch:
description: The target branch to use for the release.
default: ${{ github.event.repository.default_branch }}
branch-sha:
description: The SHA from which to create the target branch if missing.
changelog-author:
description: Git-format author to use for the changelog commits.
default: Conda Bot <[email protected]>
Expand All @@ -15,7 +17,7 @@ inputs:
default: ${{ github.token }}
fork-token:
description: 'GitHub token to create and push to the fork. Fine-grained PAT: `administration: write; contents: write`'
default: ${{ github.token }}
default: ${{ inputs.token }}
runs:
using: composite
steps:
Expand All @@ -34,7 +36,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 || github.event.repository.default_branch }})"
fi
git fetch origin
git checkout "${{ inputs.branch }}"
Expand Down

0 comments on commit 4d32b26

Please sign in to comment.