forked from jpmorganchase/jupyter-fs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add general support for binder and an action that creates a new binde…
…r link on PR creation
- Loading branch information
1 parent
1f9f659
commit 04be2e8
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Reference https://mybinder.readthedocs.io/en/latest/howto/gh-actions-badges.html | ||
name: Binder Badge | ||
on: | ||
pull_request_target: | ||
types: [opened] | ||
|
||
jobs: | ||
binder: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: comment on PR with Binder link | ||
uses: actions/github-script@v1 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
var PR_HEAD_USERREPO = process.env.PR_HEAD_USERREPO; | ||
var PR_HEAD_REF = process.env.PR_HEAD_REF; | ||
github.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: `[](https://mybinder.org/v2/gh/${PR_HEAD_USERREPO}/${PR_HEAD_REF}?urlpath=lab) Launch a binder notebook on branch _${PR_HEAD_USERREPO}/${PR_HEAD_REF}_` | ||
}) | ||
env: | ||
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} | ||
PR_HEAD_USERREPO: ${{ github.event.pull_request.head.repo.full_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# a mybinder.org-ready environment for demoing jupyter-fs | ||
# this environment may also be used locally on Linux/MacOS/Windows, e.g. | ||
# | ||
# conda env update --file binder/environment.yml | ||
# conda activate jupyter-fs-demo | ||
# | ||
name: jupyter-fs-demo | ||
|
||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python >=3.8,<3.9.0a0 | ||
- jupyterlab >=3,<4.0.0a0 | ||
- nodejs=15.8 | ||
- pip | ||
- wheel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
mkdir -p /tmp/yarn | ||
export YARN_CACHE_FOLDER="/tmp/yarn" | ||
|
||
python --version | ||
|
||
jupyter lab clean --all | ||
|
||
pip install .[dev] | ||
|
||
jupyter --version | ||
|
||
jupyter lab build --debug |