From 27d9f634bb4aa79e6dc23e5858342531b64aa06d Mon Sep 17 00:00:00 2001 From: adriangohjw Date: Wed, 22 May 2024 02:15:29 +0800 Subject: [PATCH 1/6] update actions/cache@v3 to v4 --- .github/workflows/examples.yml | 4 ++-- .github/workflows/lint-js-and-ruby.yml | 4 ++-- .github/workflows/main.yml | 16 ++++++++-------- .github/workflows/package-js-tests.yml | 2 +- .github/workflows/rspec-package-specs.yml | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index be617a358..1c1cbbc4f 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -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 }} diff --git a/.github/workflows/lint-js-and-ruby.yml b/.github/workflows/lint-js-and-ruby.yml index 54a89e017..a48bf1d24 100644 --- a/.github/workflows/lint-js-and-ruby.yml +++ b/.github/workflows/lint-js-and-ruby.yml @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7719026e5..0ba000c05 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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') }} @@ -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 }} @@ -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 }} @@ -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 }} diff --git a/.github/workflows/package-js-tests.yml b/.github/workflows/package-js-tests.yml index 7b826b02f..6ea74ae93 100644 --- a/.github/workflows/package-js-tests.yml +++ b/.github/workflows/package-js-tests.yml @@ -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') }} diff --git a/.github/workflows/rspec-package-specs.yml b/.github/workflows/rspec-package-specs.yml index da72f9fd3..15d29c6aa 100644 --- a/.github/workflows/rspec-package-specs.yml +++ b/.github/workflows/rspec-package-specs.yml @@ -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 }} From a4b0f03de81b9a2aadae9053bb62f3ded722e539 Mon Sep 17 00:00:00 2001 From: adriangohjw Date: Wed, 22 May 2024 02:15:44 +0800 Subject: [PATCH 2/6] update actions/setup-node@v3 to v4 --- .github/workflows/examples.yml | 2 +- .github/workflows/lint-js-and-ruby.yml | 2 +- .github/workflows/main.yml | 4 ++-- .github/workflows/package-js-tests.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 1c1cbbc4f..71ffae18b 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -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 diff --git a/.github/workflows/lint-js-and-ruby.yml b/.github/workflows/lint-js-and-ruby.yml index a48bf1d24..0523bcf23 100644 --- a/.github/workflows/lint-js-and-ruby.yml +++ b/.github/workflows/lint-js-and-ruby.yml @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0ba000c05..6e284566e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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 diff --git a/.github/workflows/package-js-tests.yml b/.github/workflows/package-js-tests.yml index 6ea74ae93..7c56378a0 100644 --- a/.github/workflows/package-js-tests.yml +++ b/.github/workflows/package-js-tests.yml @@ -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 From 1091744d0f77a4aa051e176eab9c04e3dab89883 Mon Sep 17 00:00:00 2001 From: adriangohjw Date: Wed, 22 May 2024 02:16:37 +0800 Subject: [PATCH 3/6] update actions/upload-artifact@v3 to v4 --- .github/workflows/examples.yml | 2 +- .github/workflows/main.yml | 8 ++++---- .github/workflows/rspec-package-specs.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 71ffae18b..27dae680b 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -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 path: ~/rspec diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6e284566e..4e3526c7a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 path: ~/rspec - name: Store artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: dummy-app-capybara path: spec/dummy/tmp/capybara - name: Store artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: dummy-app-test-log 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 path: spec/dummy/yarn-error.log diff --git a/.github/workflows/rspec-package-specs.yml b/.github/workflows/rspec-package-specs.yml index 15d29c6aa..5b09191f5 100644 --- a/.github/workflows/rspec-package-specs.yml +++ b/.github/workflows/rspec-package-specs.yml @@ -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 path: ~/rspec - name: Store artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: main-test-log path: log/test.log From 84fba61735ef068160f52e77adcf1df3ecec968c Mon Sep 17 00:00:00 2001 From: adriangohjw Date: Wed, 22 May 2024 02:42:06 +0800 Subject: [PATCH 4/6] update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69c4136aa..db6b374a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 From c6e423a50b8fcfdb7627d2f27a81ed821a5fcbba Mon Sep 17 00:00:00 2001 From: adriangohjw Date: Tue, 2 Jul 2024 14:40:16 +0800 Subject: [PATCH 5/6] ensure unique artifact name --- .github/workflows/examples.yml | 2 +- .github/workflows/main.yml | 8 ++++---- .github/workflows/rspec-package-specs.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 27dae680b..d66cee35c 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -90,5 +90,5 @@ jobs: - name: Store test results uses: actions/upload-artifact@v4 with: - name: main-rspec + name: main-rspec-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }} path: ~/rspec diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4e3526c7a..db2d549aa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -181,20 +181,20 @@ jobs: - name: Store test results 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@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@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@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 diff --git a/.github/workflows/rspec-package-specs.yml b/.github/workflows/rspec-package-specs.yml index 5b09191f5..80181f5c3 100644 --- a/.github/workflows/rspec-package-specs.yml +++ b/.github/workflows/rspec-package-specs.yml @@ -52,10 +52,10 @@ jobs: - name: Store test results 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@v4 with: - name: main-test-log + name: main-test-log-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }} path: log/test.log From 2a34821e4d701b3d39fc527f0229eeed132d17d4 Mon Sep 17 00:00:00 2001 From: adriangohjw Date: Tue, 2 Jul 2024 14:40:32 +0800 Subject: [PATCH 6/6] update actions/cache/save from v3 to v4 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index db2d549aa..3cc5c2806 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 }}