Skip to content

Commit b9e89c5

Browse files
committed
asdjkhasku
1 parent 3324ab9 commit b9e89c5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/promote-branch.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ jobs:
8585
env:
8686
target-branch: ${{ needs.workflow-variables.outputs.target-branch }}
8787
run: |
88-
git ls-remote --exit-code --heads origin ${{ env.target-branch }}
88+
exit-code=$(git ls-remote --exit-code --heads origin ${{ env.target-branch }})
8989
90-
if [[ $? -ne 0 ]]; then
91-
echo "Target branch does not exist: ${{ env.target-branch }}"
90+
if [[ $exit-code -eq 0 ]]; then
91+
echo "Target branch exist: ${{ env.target-branch }}"
9292
exit 1
9393
fi

0 commit comments

Comments
 (0)