Skip to content

Commit

Permalink
ci: update actions and disable persisted git credentials (#1578)
Browse files Browse the repository at this point in the history
* ci: update `actions/checkout` to v3

* ci: update `actions/setup-node` to v3

* ci: update `actions/cache` to v3

* ci: update `actions/upload-artifact` to v3

* ci: disable persisted git credentials for improved security

* ci: update `actions/checkout` to v4
  • Loading branch information
G-Rath authored Sep 11, 2023
1 parent b9b16ce commit 249c698
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 19 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/lint-js-and-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ jobs:
node: [18]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: 2.4.17
- name: Setup Node
uses: actions/setup-node@v2-beta
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Print system information
Expand All @@ -30,12 +32,12 @@ jobs:
echo "Yarn version: "; yarn --version
echo "Bundler version: "; bundle --version
- name: Save root node_modules to cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: node_modules
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
- name: Save root ruby gems to cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: vendor/bundle
key: v5-package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ jobs:
node: [16, 18]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
Expand All @@ -21,7 +23,7 @@ jobs:
- name: Fix dependency for libyaml-dev
run: sudo apt install libyaml-dev
- name: Setup Node
uses: actions/setup-node@v2-beta
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Print system information
Expand Down Expand Up @@ -82,14 +84,16 @@ jobs:
rake_task: ['run_rspec:all_but_examples', 'run_rspec:examples']
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: 2.4.17
- name: Setup Node
uses: actions/setup-node@v2-beta
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Print system information
Expand Down Expand Up @@ -162,22 +166,22 @@ jobs:
- name: Main CI
run: bundle exec rake ${{ matrix.rake_task }}
- name: Store test results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: main-rspec
path: ~/rspec
- name: Store artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dummy-app-capybara
path: spec/dummy/tmp/capybara
- name: Store artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dummy-app-test-log
path: spec/dummy/log/test.log
- name: Store artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dummy-app-yarn-log
path: spec/dummy/yarn-error.log
8 changes: 5 additions & 3 deletions .github/workflows/package-js-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ jobs:
node: [16, 18]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v2-beta
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Print system information
Expand All @@ -22,7 +24,7 @@ jobs:
echo "Node version: "; node -v
echo "Yarn version: "; yarn --version
- name: Save root node_modules to cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: node_modules
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/rspec-package-specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ jobs:
node: [16, 18]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
Expand All @@ -26,7 +28,7 @@ jobs:
echo "Yarn version: "; yarn --version
echo "Bundler version: "; bundle --version
- name: Save root ruby gems to cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: vendor/bundle
key: v5-package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}
Expand All @@ -35,12 +37,12 @@ jobs:
- name: Run rspec tests
run: bundle exec rspec spec/react_on_rails
- name: Store test results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: main-rspec
path: ~/rspec
- name: Store artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: main-test-log
path: log/test.log

0 comments on commit 249c698

Please sign in to comment.