diff --git a/.github/workflows/release-draft.yml b/.github/workflows/release-draft.yml index dcdfbbbdc3..dbcb3c9744 100644 --- a/.github/workflows/release-draft.yml +++ b/.github/workflows/release-draft.yml @@ -49,9 +49,9 @@ jobs: # the SHA from the third commit (i.e. Auto PR from master to develop) will be taken # else HEAD will be taken run: | - TARGET_SHA=$(git rev-parse HEAD~2) + TARGET_SHA=$(git rev-list -n 3 HEAD | tail -1) if [[ ${{ github.event.inputs.tagHeadSHA || inputs.tagHeadSHA }} == "Y" ]]; then - TARGET_SHA=$(git rev-parse HEAD) + TARGET_SHA=$(git rev-list -n 1 HEAD | tail -1) fi echo "::set-output name=TARGET_SHA::${TARGET_SHA}" echo "Setting TARGET_SHA: ${TARGET_SHA}"