Skip to content

Commit 1a82e1b

Browse files
authored
Fix install check in fork-based PRs (#794)
* print out some env vars during install check for debug Signed-off-by: Chris Trevino <[email protected]> * introspect github object for source repo Signed-off-by: Chris Trevino <[email protected]> * debug some env vars Signed-off-by: Chris Trevino <[email protected]> * ? Signed-off-by: Chris Trevino <[email protected]> * dig deeper into gh object Signed-off-by: Chris Trevino <[email protected]> * leave full github context printed out Signed-off-by: Chris Trevino <[email protected]> Signed-off-by: Chris Trevino <[email protected]>
1 parent e374bfc commit 1a82e1b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/ci-install.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
pull_request:
1717
branches: [main]
1818
paths:
19-
- '.github/workflows/ci.yml'
19+
- '.github/workflows/ci-install.yml'
2020
- 'dowhy/**'
2121
- 'tests/**'
2222
- 'docs/source/example_notebooks/**'
@@ -45,7 +45,14 @@ jobs:
4545
- name: Install dependencies
4646
run: |
4747
python -m pip install --upgrade pip
48-
pip install git+https://github.com/${GITHUB_REPOSITORY}@${GITHUB_HEAD_REF:-main}
48+
echo "HEAD_REPO='$HEAD_REPO'"
49+
echo "HEAD_BRANCH='$HEAD_BRANCH'"
50+
echo "GITHUB_CONTEXT='$GITHUB_CONTEXT'"
51+
pip install git+https://github.com/${HEAD_REPO}@${HEAD_BRANCH:-main}
52+
env:
53+
GITHUB_CONTEXT: ${{ toJson(github) }}
54+
HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
55+
HEAD_BRANCH: ${{ github.event.pull_request.head.ref || github.head_ref || 'main' }}
4956

5057
- name: Notify Discord
5158
if: failure() && github.ref == 'refs/heads/main'

0 commit comments

Comments
 (0)