This commit is contained in:
Benoit Daloze
2026-01-07 22:23:14 +01:00
parent 7f50f6e3b3
commit 1010da45f3
2 changed files with 16 additions and 18 deletions
+16 -17
View File
@@ -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` 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. 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 ### RubyGems
By default, the default RubyGems version that comes with each Ruby is used. 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). 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. 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 ## Windows
Note that running CI on Windows can be quite challenging if you are not very familiar with Windows. Note that running CI on Windows can be quite challenging if you are not very familiar with Windows.
-1
View File
@@ -47,7 +47,6 @@ inputs:
token: token:
description: | description: |
Used to authenticate with GitHub when downloading Ruby release assets. 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 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. 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 || '' }} default: ${{ github.server_url == 'https://github.com' && github.token || '' }}