-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Joe Hamman
authored
Feb 11, 2022
1 parent
88989db
commit a0f5cf7
Showing
1 changed file
with
25 additions
and
25 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 |
---|---|---|
@@ -1,26 +1,26 @@ | ||
# create a mybinder badge issue comment for testing PRs | ||
name: AddBinderBadge | ||
on: | ||
pull_request: | ||
types: [opened, reopened] | ||
jobs: | ||
build-image-without-pushing: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout PR | ||
uses: actions/checkout@v2.4.0 | ||
# # create a mybinder badge issue comment for testing PRs | ||
# name: AddBinderBadge | ||
# on: | ||
# pull_request: | ||
# types: [opened, reopened] | ||
# jobs: | ||
# build-image-without-pushing: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout PR | ||
# uses: actions/checkout@v2.4.0 | ||
|
||
- name: Comment on PR with Binder link | ||
uses: actions/github-script@v4.1 | ||
env: | ||
BRANCH_NAME: ${{ github.event.pull_request.head.ref }} | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
var BRANCH_NAME = process.env.BRANCH_NAME; | ||
github.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/${context.repo.owner}/${context.repo.repo}/${BRANCH_NAME}) :point_left: Launch a binder notebook on this branch` | ||
}) | ||
# - name: Comment on PR with Binder link | ||
# uses: actions/github-script@v4.1 | ||
# env: | ||
# BRANCH_NAME: ${{ github.event.pull_request.head.ref }} | ||
# with: | ||
# github-token: ${{secrets.GITHUB_TOKEN}} | ||
# script: | | ||
# var BRANCH_NAME = process.env.BRANCH_NAME; | ||
# github.issues.createComment({ | ||
# issue_number: context.issue.number, | ||
# owner: context.repo.owner, | ||
# repo: context.repo.repo, | ||
# body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/${context.repo.owner}/${context.repo.repo}/${BRANCH_NAME}) :point_left: Launch a binder notebook on this branch` | ||
# }) |