Skip to content

Commit c24ad5b

Browse files
committed
Add .rubocop_todo.yml to RuboCop cache of GHA workflow template
Follow-up to rails#54754. At the time of running `rails new`, .rubocop_todo.yml does not exist. This file is automatically generated by commands such as `rubocop --auto-gen-config`. If changes in caching behavior occur after such a command generates .rubocop_todo.yml, it may be difficult to notice the impact. With this change, users no longer need to worry about the presence of .rubocop_todo.yml, which is frequently used with RuboCop, in relation to the cache in GHA workflows.
1 parent d7cc945 commit c24ad5b

File tree

2 files changed

+2
-2
lines changed
  • railties/lib/rails/generators/rails

2 files changed

+2
-2
lines changed

railties/lib/rails/generators/rails/app/templates/github/ci.yml.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- name: Prepare RuboCop cache
6161
uses: actions/cache@v4
6262
env:
63-
DEPENDENCIES_HASH: ${{ hashFiles('.ruby-version', '**/.rubocop.yml', 'Gemfile.lock') }}
63+
DEPENDENCIES_HASH: ${{ hashFiles('.ruby-version', '**/.rubocop.yml', '**/.rubocop_todo.yml', 'Gemfile.lock') }}
6464
with:
6565
path: ${{ env.RUBOCOP_CACHE_ROOT }}
6666
key: rubocop-${{ runner.os }}-${{ env.DEPENDENCIES_HASH }}-${{ github.ref_name == github.event.repository.default_branch && github.run_id || 'default' }}

railties/lib/rails/generators/rails/plugin/templates/github/ci.yml.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Prepare RuboCop cache
2626
uses: actions/cache@v4
2727
env:
28-
DEPENDENCIES_HASH: ${{ hashFiles('**/.rubocop.yml', 'Gemfile.lock') }}
28+
DEPENDENCIES_HASH: ${{ hashFiles('**/.rubocop.yml', '**/.rubocop_todo.yml', 'Gemfile.lock') }}
2929
with:
3030
path: ${{ env.RUBOCOP_CACHE_ROOT }}
3131
key: rubocop-${{ runner.os }}-${{ env.RUBY_VERSION }}-${{ env.DEPENDENCIES_HASH }}-${{ github.ref_name == github.event.repository.default_branch && github.run_id || 'default' }}

0 commit comments

Comments
 (0)