Skip to content

Commit

Permalink
feat: Build for release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 18, 2019
1 parent a93d401 commit 9dd9f9e
Show file tree
Hide file tree
Showing 5 changed files with 1,686 additions and 63 deletions.
61 changes: 0 additions & 61 deletions .gitignore

This file was deleted.

67 changes: 65 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,65 @@
# tragger-mybinder-build
Github action to trigger a build on https://mybinder.org/
# trigger-mybinder-build

[![Actions Status](https://github.com/s-weigand/trigger-mybinder-build/workflows/Tests/badge.svg)](https://github.com/s-weigand/trigger-mybinder-build/actions)

Github action to trigger a build on [binder](https://mybinder.org/),
so the build is always up to date with the targeted state and users don't have to wait.

## Use with care

Since [binder](https://mybinder.org/) 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](https://mybinder.org/) 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` | _optional_ | `'gh'` | gh \| gist \| gl \| git \| zenodo \| figshare Name of the service that hosts the repo. |
| `target-state` | _optional_ | `'master'` | Name of the branch, tag or commit which should be build, by mybinder.org. |
| `debug` | _optional_ | `false` | If this is true all server response messages will be printed to console. |

## Usage

See [action.yml](action.yml)

### Basic:

```yaml
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>
```
```yaml
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>
debug: true
```
27 changes: 27 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Trigger binder build"
description: "Triggers the build of a repository on mybinder.org"
author: "Sebastian Weigand"
inputs:
target-repo:
description: "Repository which should be build"
required: true
service-name:
description: "gh|gist|gl|git|zenodo|figshare Name of the service that hosts the repo. Default: 'gh'"
required: false
default: gh
target-state:
description: "Name of the branch, tag or commit which should be build. Default: 'master'"
required: false
default: "master"
debug:
description: "Weather to print debug information or not. Default: 'false'"
required: false
default: false

runs:
using: "node12"
main: "dist/index.js"

branding:
icon: "code"
color: "yellow"
1 change: 1 addition & 0 deletions build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"owner":"s-weigand","repo":"trigger-mybinder-build","sha":"396880927964452b71747895d861fd499c38344a","ref":"refs/tags/v1.0.0","tagName":"v1.0.0","branch":"release","tags":["v1","v1.0.0"],"updated_at":"2019-12-18T21:46:03.925Z"}
Loading

0 comments on commit 9dd9f9e

Please sign in to comment.