mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 14:34:21 +02:00
Tweaks
This commit is contained in:
@@ -152,23 +152,6 @@ and the [condition and expression syntax](https://help.github.com/en/actions/ref
|
||||
The `working-directory` input can be set to resolve `.ruby-version`, `.tool-versions`, `mise.toml` and `Gemfile.lock`
|
||||
if they are not at the root of the repository, see [action.yml](action.yml) for details.
|
||||
|
||||
### Authentication Token
|
||||
|
||||
By default, this action uses `${{ github.token }}` to authenticate when downloading Ruby release assets from GitHub.
|
||||
This helps avoid rate limiting issues.
|
||||
|
||||
If you're running this action on a GitHub Enterprise Server (GHES) instance, or if you're experiencing rate limiting,
|
||||
you can provide a custom token:
|
||||
|
||||
```yaml
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '3.4'
|
||||
token: ${{ secrets.MY_GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
In most cases, you don't need to set this input as the default value is sufficient for use on github.com.
|
||||
|
||||
### RubyGems
|
||||
|
||||
By default, the default RubyGems version that comes with each Ruby is used.
|
||||
@@ -247,6 +230,22 @@ It is also possible to cache gems manually, but this is not recommended because
|
||||
There are many concerns which means using `actions/cache` is never enough for caching gems (e.g., incomplete cache key, cleaning old gems when restoring from another key, correctly hashing the lockfile if not checked in, OS versions, ABI compatibility for `ruby-head`, etc).
|
||||
So, please use `bundler-cache: true` instead and report any issue.
|
||||
|
||||
### Authentication Token
|
||||
|
||||
By default, this action uses `${{ github.token }}` to authenticate when downloading Ruby release assets from GitHub.
|
||||
This helps avoid rate limiting issues.
|
||||
|
||||
If you're running this action on a GitHub Enterprise Server (GHES) instance, or if you're experiencing rate limiting,
|
||||
you can provide a custom token:
|
||||
|
||||
```yaml
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
token: ${{ secrets.MY_GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
In most cases, you don't need to set this input as the default value is sufficient for use on github.com.
|
||||
|
||||
## Windows
|
||||
|
||||
Note that running CI on Windows can be quite challenging if you are not very familiar with Windows.
|
||||
|
||||
@@ -47,7 +47,6 @@ inputs:
|
||||
token:
|
||||
description: |
|
||||
Used to authenticate with GitHub when downloading Ruby release assets.
|
||||
Since there is a default, this is typically not supplied by the user.
|
||||
When running this action on github.com, the default value is sufficient.
|
||||
When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
|
||||
default: ${{ github.server_url == 'https://github.com' && github.token || '' }}
|
||||
|
||||
Reference in New Issue
Block a user