From c482757de8a41aca639905b5c27972f01967dd56 Mon Sep 17 00:00:00 2001 From: mishina Date: Fri, 8 Apr 2022 00:00:11 +0900 Subject: [PATCH 1/3] Update GH Actions workflows - Update actions/checkout from v2 to v3 - Use ruby/setup-ruby instead of actions/setup-ruby - Add Ruby 3.1 to the CI matrix - Enable `bundler-cache` to cache gem dependencies --- .github/workflows/ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebfb87b..09e89b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,18 +6,17 @@ jobs: test: strategy: matrix: - ruby_version: [2.6.x, 2.7.x, 3.0.x] + ruby_version: ['2.6', '2.7', '3.0', '3.1'] fail-fast: false runs-on: ubuntu-latest name: Test on Ruby ${{ matrix.ruby_version }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Ruby ${{ matrix.ruby_version }} - uses: actions/setup-ruby@v1 + uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby_version }} - - name: Install dependencies - run: bundle install + bundler-cache: true - name: Build gem run: gem build yajl-ruby.gemspec - name: Install gem From 683003b42e2c2ee8ebb70a47c68861d2ff035705 Mon Sep 17 00:00:00 2001 From: mishina Date: Sat, 11 Jun 2022 15:14:52 +0900 Subject: [PATCH 2/3] Add GitHub token permissions for workflow GitHub asks developers to define workflow permissions, see below for securing GitHub workflows against supply-chain attacks. - https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/ - https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09e89b3..6611617 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,9 @@ name: CI on: [push, pull_request] +permissions: + contents: read + jobs: test: strategy: From c81b2f1ce5afbd1104fa3dc46cfbd5b7405e2cd5 Mon Sep 17 00:00:00 2001 From: mishina Date: Thu, 29 Dec 2022 21:40:01 +0900 Subject: [PATCH 3/3] Add Ruby 3.2 to the CI matrix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6611617..d2aeb74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: test: strategy: matrix: - ruby_version: ['2.6', '2.7', '3.0', '3.1'] + ruby_version: ['2.6', '2.7', '3.0', '3.1', '3.2'] fail-fast: false runs-on: ubuntu-latest name: Test on Ruby ${{ matrix.ruby_version }}