Skip to content

Commit e37f73b

Browse files
authored
chore(e2e) don't fail when inputs.branch is empty (#2555)
Signed-off-by: Nick Boldt <[email protected]>
1 parent c81e5ff commit e37f73b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/push-e2e-runner.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,15 @@ jobs:
4646
echo "PLATFORM=linux/amd64" >> $GITHUB_ENV
4747
4848
# create image tag from the correct branch (either from a push or a workflow_dispatch trigger)
49-
if [[ "${{ inputs.branch }}" != "NONE" ]]; then
49+
if [[ "${{ inputs.branch }}" ]] && [[ "${{ inputs.branch }}" != "NONE" ]]; then
50+
echo "Switch to ${{ inputs.branch }}"
5051
git checkout "${{ inputs.branch }}"
5152
IMAGE_TAG="${{ inputs.branch }}"
5253
else
54+
echo "Use current branch ${{ github.ref }}"
5355
IMAGE_TAG=$(git rev-parse --abbrev-ref HEAD)
5456
fi
57+
echo "Use IMAGE_TAG = $IMAGE_TAG"
5558
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV
5659
5760
- name: Get the last commit short SHA

0 commit comments

Comments
 (0)