Skip to content

Commit

Permalink
Fix install check in fork-based PRs (#794)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
darthtrevino authored Dec 16, 2022
1 parent e374bfc commit 1a82e1b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/ci-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/**'
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 1a82e1b

Please sign in to comment.