From 87e9c359d54519e0429ca3cd46b58ad312d7bef4 Mon Sep 17 00:00:00 2001 From: Matthias Reso <13337103+mreso@users.noreply.github.com> Date: Thu, 22 Aug 2024 12:06:10 -0700 Subject: [PATCH] Fix/docker repo url3 (#3297) * Make repo url work in merge queue ci, which is not a pull request.... * dump context --- .github/workflows/docker-ci.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-ci.yaml b/.github/workflows/docker-ci.yaml index 09b796957d..0436b7184f 100644 --- a/.github/workflows/docker-ci.yaml +++ b/.github/workflows/docker-ci.yaml @@ -19,6 +19,11 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive + - name: Dump github context + run: echo "$GITHUB_CONTEXT" + shell: bash + env: + GITHUB_CONTEXT: ${{ toJson(github) }} - name: Test build_image.sh script with custom tagging and gpu flag working-directory: docker @@ -39,7 +44,10 @@ jobs: working-directory: docker run: | IMAGE_TAG=test-image-${{ matrix.python-version }} - REPO_URL=${{ github.event.pull_request.head.repo.clone_url }} + REPO_URL="${{ github.event.pull_request.head.repo.clone_url }}" + if [[ -z "${REPO_URL}" ]]; then + REPO_URL="https://github.com/pytorch/serve.git" + fi ./build_image.sh -py "${{ matrix.python-version }}" -t "${IMAGE_TAG}" -b "${{ steps.branch-name.outputs.GITHUB_BRANCH }}" -repo ${REPO_URL} -s echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_OUTPUT