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
Unai Abrisketa committed May 16, 2022
1 parent feccb91 commit 58f19fa
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 11 deletions.
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
### Setup ruby and node
This action sets up ruby and node with caching.
# action-build-rails

Check the `action.yml` file for more information.
GitHub Action for setting up a Rails environment installing Ruby and Yarn dependencies. It caches dependencies for reduced execution times.

## Inputs

| Name | Description | Default | Required |
|----------------------|------------------------------|---------|----------|
| `ruby_version` | The ruby version to be used. | `3.1.2` | `true` |
| `node_version` | The node version to be used. | `18` | `true` |
| `bundle_github__com` | The GitHub access token. | `nil` | `false` |

## Usage

```yml
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Build Rails
uses: ePages-de/action-build-rails@v1
with:
node_version: 18
ruby_version: 3.1.2
bundle_github__com: ${{ secrets.GITHUB_TOKEN }}
```
21 changes: 13 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
name: Build
description: Sets up ruby and node. Installs node dependencies.
author: Roberto Welzel Filho <rwelzel@epages.com>
name: Build Rails
description: Sets up Rails environment, installing Ruby and Yarn dependencies.
author: Roberto Welzel Filho <rwelzel@epages.com>, Unai Abrisketa <uabrisketa@epages.com>

inputs:
ruby_version:
description: The ruby version to be used. Defaults to 2.7.5
description: The ruby version to be used. Defaults to `3.1.2`.
required: true
default: 2.7.5
default: '3.1.2'
node_version:
description: The node version to be used. Defaults to 16
description: The node version to be used. Defaults to `18`.
required: true
default: '16'
default: '18'
bundle_github__com:
description: The GitHub access token.
required: false

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
Expand All @@ -25,4 +30,4 @@ runs:
node-version: ${{ inputs.node_version }}
cache: yarn
- shell: bash
run: yarn install --production=false
run: yarn install --production=false

0 comments on commit 58f19fa

Please sign in to comment.