Skip to content

Commit c21f450

Browse files
author
Unai Abrisketa
committed
Add changes for v1 and documentation
1 parent ea578b4 commit c21f450

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,24 @@
1-
### Team 42 Bundle run
1+
# action-ruby-run
2+
3+
GitHub Action for installing Ruby gems and running commands. It caches dependencies for reduced execution times.
4+
5+
## Inputs
6+
7+
| Name | Description | Default | Required |
8+
|----------------------|------------------------------|---------|----------|
9+
| `ruby_version` | The Ruby version to be used. | `3.1.2` | `true` |
10+
| `cmd` | The command to be executed. | `nil` | `true` |
11+
| `bundle_github__com` | The GitHub access token. | `nil` | `false` |
12+
13+
## Usage
14+
15+
```yml
16+
jobs:
17+
rubocop:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: ePages-de/action-ruby-run@v1
21+
with:
22+
ruby_version: 3.1.2
23+
cmd: bundle exec rubocop
24+
```

action.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Run Ruby
2+
description: Install Bundle gems and run commands.
3+
author: Alket Tarko <atarko@epages.com>, Roberto Welzel Filho <rwelzel@epages.com>, Unai Abrisketa <uabrisketa@epages.com>
4+
5+
inputs:
6+
ruby_version:
7+
description: The Ruby version to be used. Defaults to `3.1.2`.
8+
required: true
9+
default: '3.1.2'
10+
bundle_github__com:
11+
description: The GitHub access token.
12+
required: false
13+
cmd:
14+
description: The command to be executed.
15+
required: true
16+
17+
runs:
18+
using: composite
19+
steps:
20+
- uses: actions/checkout@v2
21+
- uses: ruby/setup-ruby@v1
22+
env:
23+
BUNDLE_GITHUB__COM: ${{ inputs.bundle_github__com }}
24+
with:
25+
ruby-version: ${{ inputs.ruby_version }}
26+
bundler-cache: true
27+
- shell: bash
28+
run: ${{ inputs.cmd }}

0 commit comments

Comments
 (0)