From eed8f13a29db3b8fe60ef028b6bd7040422e3047 Mon Sep 17 00:00:00 2001 From: Albert T Date: Sat, 24 Oct 2026 23:04:34 -0400 Subject: [PATCH 1/2] ci: run on ubuntu-24.04 and replace the removed Cloudflare Pages action ubuntu-latest moved to ubuntu-26.04, which has no prebuilt Ruby 3.0 or 3.1. That breaks the Ruby 3.1 and Rubocop jobs. Pin the runner to ubuntu-24.04, and move the old pinned setup-ruby SHA to v1.328.0. cloudflare/pages-action can no longer be resolved, which breaks the docs job. Deploy with cloudflare/wrangler-action and the equivalent `pages deploy` command. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01CEuUhrasuRFEFW6KcTW7QN --- .github/workflows/rspec.yml | 3 ++- .github/workflows/rubocop.yml | 7 ++++--- .github/workflows/sdk-reference.yaml | 17 ++++++++--------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index e50a096e..4c3671d6 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -15,7 +15,8 @@ on: jobs: test: - runs-on: ubuntu-latest + # ubuntu-latest is now ubuntu-26.04, which has no prebuilt Ruby 3.0 or 3.1. + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index 982bfd3b..15df618b 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -15,16 +15,17 @@ on: jobs: test: - runs-on: ubuntu-latest + # ubuntu-latest is now ubuntu-26.04, which has no prebuilt Ruby 3.0 or 3.1. + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v2 - name: Set up Ruby # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, # change this to (see https://github.com/ruby/setup-ruby#versioning): # uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e + uses: ruby/setup-ruby@e81a8fa391b11a595c1b7ed84177cc0fe02faf83 # v1.328.0 with: - ruby-version: 3.0 + ruby-version: '3.0' bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Generate docs run: bundle exec rubocop --config .rubocop.yml diff --git a/.github/workflows/sdk-reference.yaml b/.github/workflows/sdk-reference.yaml index 71ce7169..0333ad75 100644 --- a/.github/workflows/sdk-reference.yaml +++ b/.github/workflows/sdk-reference.yaml @@ -8,19 +8,20 @@ on: jobs: docs: - runs-on: ubuntu-latest + # ubuntu-latest is now ubuntu-26.04, which has no prebuilt Ruby 3.0 or 3.1. + runs-on: ubuntu-24.04 environment: name: sdk-reference - url: ${{ steps.deploy.outputs.url }} + url: ${{ steps.deploy.outputs.deployment-url }} steps: - uses: actions/checkout@v3 - name: Set up Ruby # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, # change this to (see https://github.com/ruby/setup-ruby#versioning): # uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e + uses: ruby/setup-ruby@e81a8fa391b11a595c1b7ed84177cc0fe02faf83 # v1.328.0 with: - ruby-version: 3.0 + ruby-version: '3.0' bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Generate documentation run: bundle exec yard @@ -34,12 +35,10 @@ jobs: echo "CLOUDFLARE_BRANCH=$BRANCH" >> "$GITHUB_ENV" fi - name: Publish to Cloudflare Pages - uses: cloudflare/pages-action@v1 + # cloudflare/pages-action no longer exists; wrangler-action is its replacement. + uses: cloudflare/wrangler-action@953926a2e2182532811c01a25e53647d93bf07c0 # v4.1.3 id: deploy with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - projectName: nylas-ruby-sdk-reference - directory: doc - wranglerVersion: "3" - branch: ${{ env.CLOUDFLARE_BRANCH }} + command: pages deploy doc --project-name=nylas-ruby-sdk-reference --branch=${{ env.CLOUDFLARE_BRANCH }} From 902681886a8d84689c7740103cc5a5bef2cc6893 Mon Sep 17 00:00:00 2001 From: Albert T Date: Sat, 24 Oct 2026 23:07:55 -0400 Subject: [PATCH 2/2] ci: limit GITHUB_TOKEN to contents: read Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01CEuUhrasuRFEFW6KcTW7QN --- .github/workflows/rspec.yml | 3 +++ .github/workflows/rubocop.yml | 3 +++ .github/workflows/sdk-reference.yaml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index 4c3671d6..6a08e913 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -13,6 +13,9 @@ on: pull_request: branches: [ main ] +permissions: + contents: read + jobs: test: # ubuntu-latest is now ubuntu-26.04, which has no prebuilt Ruby 3.0 or 3.1. diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index 15df618b..896e593e 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -13,6 +13,9 @@ on: pull_request: branches: [ main ] +permissions: + contents: read + jobs: test: # ubuntu-latest is now ubuntu-26.04, which has no prebuilt Ruby 3.0 or 3.1. diff --git a/.github/workflows/sdk-reference.yaml b/.github/workflows/sdk-reference.yaml index 0333ad75..97dd8a35 100644 --- a/.github/workflows/sdk-reference.yaml +++ b/.github/workflows/sdk-reference.yaml @@ -6,6 +6,9 @@ on: - main pull_request: +permissions: + contents: read + jobs: docs: # ubuntu-latest is now ubuntu-26.04, which has no prebuilt Ruby 3.0 or 3.1.