-
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 changes for v1 and documentation
- Loading branch information
Unai Abrisketa
committed
May 16, 2022
1 parent
ea578b4
commit c21f450
Showing
2 changed files
with
52 additions
and
1 deletion.
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 +1,24 @@ | ||
### Team 42 Bundle run | ||
# action-ruby-run | ||
|
||
GitHub Action for installing Ruby gems and running commands. It caches dependencies for reduced execution times. | ||
|
||
## Inputs | ||
|
||
| Name | Description | Default | Required | | ||
|----------------------|------------------------------|---------|----------| | ||
| `ruby_version` | The Ruby version to be used. | `3.1.2` | `true` | | ||
| `cmd` | The command to be executed. | `nil` | `true` | | ||
| `bundle_github__com` | The GitHub access token. | `nil` | `false` | | ||
|
||
## Usage | ||
|
||
```yml | ||
jobs: | ||
rubocop: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: ePages-de/action-ruby-run@v1 | ||
with: | ||
ruby_version: 3.1.2 | ||
cmd: bundle exec rubocop | ||
``` |
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,28 @@ | ||
name: Run Ruby | ||
description: Install Bundle gems and run commands. | ||
author: Alket Tarko <atarko@epages.com>, Roberto Welzel Filho <rwelzel@epages.com>, Unai Abrisketa <uabrisketa@epages.com> | ||
|
||
inputs: | ||
ruby_version: | ||
description: The Ruby version to be used. Defaults to `3.1.2`. | ||
required: true | ||
default: '3.1.2' | ||
bundle_github__com: | ||
description: The GitHub access token. | ||
required: false | ||
cmd: | ||
description: The command to be executed. | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ruby/setup-ruby@v1 | ||
env: | ||
BUNDLE_GITHUB__COM: ${{ inputs.bundle_github__com }} | ||
with: | ||
ruby-version: ${{ inputs.ruby_version }} | ||
bundler-cache: true | ||
- shell: bash | ||
run: ${{ inputs.cmd }} |