We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3324ab9 commit b9e89c5Copy full SHA for b9e89c5
.github/workflows/promote-branch.yml
@@ -85,9 +85,9 @@ jobs:
85
env:
86
target-branch: ${{ needs.workflow-variables.outputs.target-branch }}
87
run: |
88
- git ls-remote --exit-code --heads origin ${{ env.target-branch }}
+ exit-code=$(git ls-remote --exit-code --heads origin ${{ env.target-branch }})
89
90
- if [[ $? -ne 0 ]]; then
91
- echo "Target branch does not exist: ${{ env.target-branch }}"
+ if [[ $exit-code -eq 0 ]]; then
+ echo "Target branch exist: ${{ env.target-branch }}"
92
exit 1
93
fi
0 commit comments