Skip to content

Commit

Permalink
Add changes for v1 and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
unabris committed May 16, 2022
1 parent ea578b4 commit c21f450
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
25 changes: 24 additions & 1 deletion README.md
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
```
28 changes: 28 additions & 0 deletions action.yaml
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 <[email protected]>, Roberto Welzel Filho <[email protected]>, Unai Abrisketa <[email protected]>

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 }}

0 comments on commit c21f450

Please sign in to comment.