Skip to content

Commit

Permalink
Upgrade GitHub Actions versions (#1623)
Browse files Browse the repository at this point in the history
* update actions/cache@v3 to v4

* update actions/setup-node@v3 to v4

* update actions/upload-artifact@v3 to v4

* update changelog

* ensure unique artifact name

* update actions/cache/save from v3 to v4
  • Loading branch information
adriangohjw authored Jul 2, 2024
1 parent a8ad1db commit 6a9c101
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 34 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
ruby-version: ${{ matrix.versions == 'oldest' && '3.0' || '3.3' }}
bundler: 2.5.9
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
- name: Print system information
Expand All @@ -51,12 +51,12 @@ jobs:
if: matrix.versions == 'oldest'
run: script/convert
- name: Save root node_modules to cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
- name: Save root ruby gems to cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: vendor/bundle
key: package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-${{ matrix.versions }}
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
if: steps.changed-files.outputs.any_changed == 'true'
run: bundle exec rake run_rspec:${{ matrix.versions == 'oldest' && 'web' || 'shaka' }}packer_examples
- name: Store test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: main-rspec
name: main-rspec-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
path: ~/rspec
6 changes: 3 additions & 3 deletions .github/workflows/lint-js-and-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
ruby-version: 3
bundler: 2.5.9
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
- name: Print system information
Expand All @@ -33,12 +33,12 @@ jobs:
echo "Yarn version: "; yarn --version
echo "Bundler version: "; bundle --version
- name: Save root node_modules to cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
- name: Save root ruby gems to cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: vendor/bundle
key: package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-oldest
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Fix dependency for libyaml-dev
run: sudo apt install libyaml-dev
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.versions == 'oldest' && '16' || '20' }}
- name: Print system information
Expand All @@ -42,7 +42,7 @@ jobs:
if: matrix.versions == 'oldest'
run: script/convert
- name: Save root node_modules to cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
Expand All @@ -53,7 +53,7 @@ jobs:
- name: yalc publish for react-on-rails
run: yalc publish
- name: Save spec/dummy/node_modules to cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: spec/dummy/node_modules
key: dummy-app-node-modules-cache-${{ hashFiles('spec/dummy/package.json') }}-${{ matrix.versions }}
Expand All @@ -62,7 +62,7 @@ jobs:
- name: Install Node modules with Yarn for dummy app
run: cd spec/dummy && yarn install --no-progress --no-emoji
- name: Save dummy app ruby gems to cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: spec/dummy/vendor/bundle
key: dummy-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-${{ matrix.versions }}
Expand All @@ -75,7 +75,7 @@ jobs:
- id: get-sha
run: echo "::set-output name=sha::$(git rev-parse HEAD)"
- name: Save test webpack bundles to cache (for build number checksum used by rspec job)
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: spec/dummy/public/webpack
key: dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }}-${{ matrix.versions }}
Expand All @@ -97,7 +97,7 @@ jobs:
ruby-version: ${{ matrix.versions == 'oldest' && '3.0' || '3.3' }}
bundler: 2.5.9
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.versions == 'oldest' && '16' || '20' }}
- name: Print system information
Expand All @@ -113,29 +113,29 @@ jobs:
if: matrix.versions == 'oldest'
run: script/convert
- name: Save root node_modules to cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
- name: Save root ruby gems to cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: vendor/bundle
key: package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-${{ matrix.versions }}
- name: Save dummy app ruby gems to cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: spec/dummy/vendor/bundle
key: dummy-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-${{ matrix.versions }}
- name: Save spec/dummy/node_modules to cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: spec/dummy/node_modules
key: dummy-app-node-modules-cache-${{ hashFiles('spec/dummy/package.json') }}-${{ matrix.versions }}
- id: get-sha
run: echo "::set-output name=sha::$(git rev-parse HEAD)"
- name: Save test webpack bundles to cache (for build number checksum used by rspec job)
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: spec/dummy/public/webpack
key: dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }}-${{ matrix.versions }}
Expand Down Expand Up @@ -179,22 +179,22 @@ jobs:
- name: Main CI
run: bundle exec rake run_rspec:all_dummy
- name: Store test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: main-rspec
name: main-rspec-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
path: ~/rspec
- name: Store artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dummy-app-capybara
name: dummy-app-capybara-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
path: spec/dummy/tmp/capybara
- name: Store artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dummy-app-test-log
name: dummy-app-test-log-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
path: spec/dummy/log/test.log
- name: Store artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dummy-app-yarn-log
name: dummy-app-yarn-log-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
path: spec/dummy/yarn-error.log
4 changes: 2 additions & 2 deletions .github/workflows/package-js-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.versions == 'oldest' && '16' || '20' }}
- name: Print system information
Expand All @@ -29,7 +29,7 @@ jobs:
echo "Node version: "; node -v
echo "Yarn version: "; yarn --version
- name: Save root node_modules to cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/rspec-package-specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
if: matrix.versions == 'oldest'
run: script/convert
- name: Save root ruby gems to cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: vendor/bundle
key: package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ matrix.versions }}
Expand All @@ -50,12 +50,12 @@ jobs:
- name: Run rspec tests
run: bundle exec rspec spec/react_on_rails
- name: Store test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: main-rspec
name: main-rspec-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
path: ~/rspec
- name: Store artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: main-test-log
name: main-test-log-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
path: log/test.log
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Please follow the recommendations outlined at [keepachangelog.com](http://keepac
### [Unreleased]
Changes since the last non-beta release.

#### Changed
- Update outdated GitHub Actions to use Node.js 20.0 versions instead [PR 1623](https://github.com/shakacode/react_on_rails/pull/1623) by [adriangohjw](https://github.com/adriangohjw).

### [14.0.3] - 2024-06-28

#### Fixed
Expand Down

0 comments on commit 6a9c101

Please sign in to comment.