3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2024-12-17 13:47:20 +00:00

Resolve error setting the base sha (#272)

* Resolve error setting the base sha

* Update action.yml

* Update action.yml
This commit is contained in:
Tonye Jack 2021-12-04 07:31:37 -05:00 committed by GitHub
parent 66714ebcad
commit b1b88f09a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -98,7 +98,9 @@ runs:
# "Set base sha..."
if [[ -n "${{ inputs.base_sha }}" ]]; then
echo "::set-output name=base_sha::${{ inputs.base_sha }}"
elif [[ "${{ inputs.since_last_remote_commit }}" == "true" && "${{ github.event.base_ref }}" != "null" ]]; then
elif [[ "${{ inputs.since_last_remote_commit }}" == "true" && "${{ github.event_name }}" == "pull_request" ]]; then
echo "::set-output name=base_sha::${{ github.event.pull_request.base.sha }}"
elif [[ "${{ inputs.since_last_remote_commit }}" == "true" && "${{ github.event_name }}" == "push" && "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]]; then
echo "::set-output name=base_sha::${{ github.event.before }}"
fi
id: base-sha