Skip to content
code

GitHub Action

Trigger binder build

v1.1.0 Latest version

Trigger binder build

code

Trigger binder build

Triggers the build of a repository on mybinder.org

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Trigger binder build

uses: s-weigand/[email protected]

Learn more about this action in s-weigand/trigger-mybinder-build

Choose a version

trigger-mybinder-build

Actions Status

Github action to trigger a build on binder, so the build is always up to date with the targeted state and users don't have to wait.

Use with care

Since binder is an none profit project, please use this action sparsely and in a none spammy manner, to treat their resources with care. An example would be a repository, where the branch which should be build is only changed via pull requests and this action is only executed on that branch. To not spam binder is also why, by design, target-repo is a required input and not read from the environment, since this prevents unnecessary builds of forks.

Inputs

Name Requirement Default Description
target-repo required Repository which should be build by mybinder.org .
service-name required 'gh' gh | gist | gl | git | zenodo | figshare Name of the service that hosts the repo.
target-state optional '' Name of the branch, tag or commit which should be build, by mybinder.org.
use-default-build-servers optional true Whether or not to use the default mybinder.org build servers. If false and additional-build-server is not specified, this will throw an error.
additional-build-servers optional '' Newline separated list of urls, which point do binder build servers base url.
debug optional false If this is true all server response messages will be printed to console.

Usage

See action.yml

Basic:

name: 'Trigger-Binder-build'
on:
  push:
    branches:
      - <binder-branch>

jobs:
  trigger-binder-build:
    runs-on: [ubuntu-latest]
    steps:
      - uses: s-weigand/trigger-mybinder-build@v1
        with:
          target-repo: <my-github-handle>/<my-repo-name>

Customized:

name: 'Trigger-Binder-build'
on:
  push:
    branches:
      - <binder-branch>

jobs:
  trigger-binder-build:
    runs-on: [ubuntu-latest]
    steps:
      - uses: s-weigand/trigger-mybinder-build@v1
        with:
          target-repo: <my-gitlab-handle>/<my-repo-name>
          service-name: gl
          target-state: <binder-branch-tag-commit>
          use-default-build-servers: false
          additional-build-servers: |
            <build-server-url-1>
            <build-server-url-2>
          debug: true