workflows/check-by-name: print failed command output
This commit is contained in:
parent
e1a4c706e6
commit
5fbbada2fb
1 changed files with 3 additions and 1 deletions
4
.github/workflows/check-by-name.yml
vendored
4
.github/workflows/check-by-name.yml
vendored
|
@ -19,11 +19,13 @@ jobs:
|
|||
steps:
|
||||
- name: Resolving the merge commit
|
||||
run: |
|
||||
if result=$(git ls-remote --exit-code ${{ github.event.pull_request.base.repo.clone_url }} refs/pull/${{ github.event.pull_request.number }}/merge); then
|
||||
if result=$(git ls-remote --exit-code ${{ github.event.pull_request.base.repo.clone_url }} refs/pull/${{ github.event.pull_request.number }}/merge 2>&1); then
|
||||
mergedSha=$(cut -f1 <<< "$result")
|
||||
echo "The PR appears to not have any conflicts, checking the merge commit $mergedSha"
|
||||
else
|
||||
echo "The PR may have a merge conflict"
|
||||
echo "'git ls-remote' output was:"
|
||||
echo "$result"
|
||||
exit 1
|
||||
fi
|
||||
echo "mergedSha=$mergedSha" >> "$GITHUB_ENV"
|
||||
|
|
Loading…
Reference in a new issue