fix: bug force pushing commits after a rebase (#583)
This commit is contained in:
parent
257f37d700
commit
5e56dcabdd
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
## changed-files
|
## changed-files
|
||||||
|
|
||||||
Retrieve all changed files and directories relative to the target branch (`pull_request*` based events) or the last remote commit (`push` based event) returning the **absolute path** to all changed files and directories from root of the project.
|
Retrieve all changed files and directories relative to the target branch (`pull_request*` based events) or the last remote commit (`push` based event) returning the **absolute path** to all changed files and directories from the project root.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
@ -154,8 +154,13 @@ runs:
|
|||||||
# "Set base sha..."
|
# "Set base sha..."
|
||||||
if [[ -n "${{ inputs.base_sha }}" ]]; then
|
if [[ -n "${{ inputs.base_sha }}" ]]; then
|
||||||
echo "::set-output name=base_sha::${{ inputs.base_sha }}"
|
echo "::set-output name=base_sha::${{ inputs.base_sha }}"
|
||||||
elif [[ "${{ inputs.since_last_remote_commit }}" == "true" && "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]]; then
|
elif [[ "${{ inputs.since_last_remote_commit }}" == "true" && "${{ github.event.forced }}" == "true" && "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]]; then
|
||||||
echo "::set-output name=base_sha::${{ github.event.before }}"
|
LAST_REMOTE_COMMIT=$(git rev-parse $(git branch -r --sort=-committerdate | head -1))
|
||||||
|
if [[ "${{ inputs.sha }}" != "$LAST_REMOTE_COMMIT" ]]; then
|
||||||
|
echo "::set-output name=base_sha::$LAST_REMOTE_COMMIT"
|
||||||
|
fi
|
||||||
|
elif [[ "${{ inputs.since_last_remote_commit }}" == "true" && "${{ github.event.forced }}" != "true" && "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]]; then
|
||||||
|
echo "::set-output name=base_sha::${{ github.event.before }}"
|
||||||
fi
|
fi
|
||||||
id: base-sha
|
id: base-sha
|
||||||
shell: bash
|
shell: bash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user