Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 6b47f0c

Browse files
authored
Merge pull request #301 from jtpio/binder-badge-pr
Switch to `maintainer-tools` action for Binder on PR
2 parents 49b9ae3 + 2ac2740 commit 6b47f0c

File tree

1 file changed

+6
-21
lines changed

1 file changed

+6
-21
lines changed

.github/workflows/binder.yml

+6-21
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,15 @@
1-
# Reference https://mybinder.readthedocs.io/en/latest/howto/gh-actions-badges.html
21
name: Binder Badge
32
on:
43
pull_request_target:
54
types: [opened]
65

7-
permissions:
8-
pull-requests:
9-
write
10-
116
jobs:
127
binder:
138
runs-on: ubuntu-latest
9+
permissions:
10+
pull-requests: write
1411
steps:
15-
- name: comment on PR with Binder link
16-
uses: actions/github-script@v3
17-
with:
18-
github-token: ${{secrets.GITHUB_TOKEN}}
19-
script: |
20-
var PR_HEAD_USERREPO = process.env.PR_HEAD_USERREPO;
21-
var PR_HEAD_REF = process.env.PR_HEAD_REF;
22-
github.issues.createComment({
23-
issue_number: context.issue.number,
24-
owner: context.repo.owner,
25-
repo: context.repo.repo,
26-
body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/${PR_HEAD_USERREPO}/${PR_HEAD_REF}?urlpath=retro/tree) :point_left: Launch RetroLab on Binder`
27-
})
28-
env:
29-
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
30-
PR_HEAD_USERREPO: ${{ github.event.pull_request.head.repo.full_name }}
12+
- uses: jupyterlab/maintainer-tools/.github/actions/binder-link@v1
13+
with:
14+
github_token: ${{ secrets.github_token }}
15+
url_path: retro

0 commit comments

Comments
 (0)