From 1a82e1b1c746f551d091eaf537b3859faa637b8b Mon Sep 17 00:00:00 2001 From: Chris Trevino Date: Fri, 16 Dec 2022 11:31:49 -0800 Subject: [PATCH] Fix install check in fork-based PRs (#794) * print out some env vars during install check for debug Signed-off-by: Chris Trevino * introspect github object for source repo Signed-off-by: Chris Trevino * debug some env vars Signed-off-by: Chris Trevino * ? Signed-off-by: Chris Trevino * dig deeper into gh object Signed-off-by: Chris Trevino * leave full github context printed out Signed-off-by: Chris Trevino Signed-off-by: Chris Trevino --- .github/workflows/ci-install.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-install.yml b/.github/workflows/ci-install.yml index 1576885b09..19c1e66fee 100644 --- a/.github/workflows/ci-install.yml +++ b/.github/workflows/ci-install.yml @@ -16,7 +16,7 @@ on: pull_request: branches: [main] paths: - - '.github/workflows/ci.yml' + - '.github/workflows/ci-install.yml' - 'dowhy/**' - 'tests/**' - 'docs/source/example_notebooks/**' @@ -45,7 +45,14 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install git+https://github.com/${GITHUB_REPOSITORY}@${GITHUB_HEAD_REF:-main} + echo "HEAD_REPO='$HEAD_REPO'" + echo "HEAD_BRANCH='$HEAD_BRANCH'" + echo "GITHUB_CONTEXT='$GITHUB_CONTEXT'" + pip install git+https://github.com/${HEAD_REPO}@${HEAD_BRANCH:-main} + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name || github.repository }} + HEAD_BRANCH: ${{ github.event.pull_request.head.ref || github.head_ref || 'main' }} - name: Notify Discord if: failure() && github.ref == 'refs/heads/main'