Fetch less and use the right SHA (#5621)
This commit is contained in:
@@ -29,7 +29,7 @@ runs:
|
|||||||
PRIOR_REF: ${{ inputs.prior_ref }}
|
PRIOR_REF: ${{ inputs.prior_ref }}
|
||||||
TEMPLATE_FILE: "${{ github.action_path }}/pr_body_template.txt"
|
TEMPLATE_FILE: "${{ github.action_path }}/pr_body_template.txt"
|
||||||
run: |
|
run: |
|
||||||
git fetch origin --tags
|
git fetch origin "$HEAD_REF" "$PRIOR_REF"
|
||||||
|
|
||||||
{
|
{
|
||||||
sed -e "s/{{VERSION}}/${VERSION}/g" \
|
sed -e "s/{{VERSION}}/${VERSION}/g" \
|
||||||
|
|||||||
@@ -58,7 +58,9 @@ jobs:
|
|||||||
|
|
||||||
just prepare-release $VERSION
|
just prepare-release $VERSION
|
||||||
BRANCH_NAME=$(git branch --show-current)
|
BRANCH_NAME=$(git branch --show-current)
|
||||||
|
HEAD_REF=$(git rev-parse HEAD)
|
||||||
echo "branch_name=$BRANCH_NAME" >> $GITHUB_ENV
|
echo "branch_name=$BRANCH_NAME" >> $GITHUB_ENV
|
||||||
|
echo "head_ref=$HEAD_REF" >> $GITHUB_ENV
|
||||||
echo "Branch: $BRANCH_NAME"
|
echo "Branch: $BRANCH_NAME"
|
||||||
|
|
||||||
- name: push release branch
|
- name: push release branch
|
||||||
@@ -69,7 +71,7 @@ jobs:
|
|||||||
uses: ./.github/actions/generate-release-pr-body
|
uses: ./.github/actions/generate-release-pr-body
|
||||||
with:
|
with:
|
||||||
version: ${{ env.version }}
|
version: ${{ env.version }}
|
||||||
head_ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
head_ref: ${{ env.head_ref }}
|
||||||
prior_ref: ${{ env.prior_ref }}
|
prior_ref: ${{ env.prior_ref }}
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
BRANCH: ${{ steps.version.outputs.branch }}
|
BRANCH: ${{ steps.version.outputs.branch }}
|
||||||
run: |
|
run: |
|
||||||
git fetch origin
|
git fetch origin "$BRANCH"
|
||||||
|
|
||||||
BRANCH_SHA=$(git rev-parse "origin/$BRANCH")
|
BRANCH_SHA=$(git rev-parse "origin/$BRANCH")
|
||||||
echo "branch_sha=$BRANCH_SHA" >> $GITHUB_OUTPUT
|
echo "branch_sha=$BRANCH_SHA" >> $GITHUB_OUTPUT
|
||||||
|
|||||||
Reference in New Issue
Block a user