From 1010da45f3d2f730b1edc13317e79c7df4570818 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Wed, 7 Jan 2026 15:36:00 +0100 Subject: [PATCH] Tweaks --- README.md | 33 ++++++++++++++++----------------- action.yml | 1 - 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 1ddfa86..7f38b5e 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/action.yml b/action.yml index 3b8daad..733938d 100644 --- a/action.yml +++ b/action.yml @@ -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 || '' }}