diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 7e59960ed6e6..75c211c5b0bc 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -162,7 +162,20 @@ jobs: fi echo "Branch Name is $BRANCH_NAME" echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT - + # branch name should be either master or release-1.XX + - name: Fail if branch name does not match pattern + run: | + if [[ ! ${{ steps.branch_step.outputs.branch_name }} =~ ^(master|release-[0-9]+\.[0-9]+)$ ]]; then + echo "Branch name ${{ steps.branch_step.outputs.branch_name }} does not match pattern" + exit 1 + fi + - name: On Failure, Launch Debug Session + uses: lhotari/action-upterm@v1 + if: ${{ failure() }} + with: + ## If no one connects after 5 minutes, shut down server. + wait-timeout-minutes: 5 + docker-go: needs: [build, build-go-tests] name: Docker Tests In GO