From 1e6c65002439bdcd1c2959d85eef28c88be3aa04 Mon Sep 17 00:00:00 2001 From: Roman Priesol Date: Tue, 3 Nov 2026 18:12:53 +0100 Subject: [PATCH] Renovate: run in the official image instead of npm install No per-run npm install (and its deprecation/allow-scripts warnings), Node comes with the image so the engines.node mismatch can't recur, and containerbase installs Ruby/bundler on demand for Gemfile.lock. --- .gitea/workflows/renovate.yml | 35 ++++++++++------------------------- renovate.json | 7 ------- 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/.gitea/workflows/renovate.yml b/.gitea/workflows/renovate.yml index be354d0..2005cc4 100644 --- a/.gitea/workflows/renovate.yml +++ b/.gitea/workflows/renovate.yml @@ -8,33 +8,17 @@ on: jobs: renovate: - # Same reasoning as check's runs-on in ci.yml: brick-build's job - # container now has Node (repointed at Gitea's own official runner - # image), which setup-node/npm below need. runs-on: brick-build + # Official image instead of `npm install -g renovate`: no per-run + # install, and Node is whatever this Renovate release ships with (npm + # used to silently pick an older Renovate when setup-node's major + # didn't match its engines.node). Ruby/bundler for Gemfile.lock + # updates get installed on demand by the image's containerbase + # (RENOVATE_BINARY_SOURCE=install below). Renovate bumps this + # tag itself. + container: + image: ghcr.io/renovatebot/renovate:44 steps: - # Must match Renovate's own engines.node (44.x: ^24.11). On any - # other major, npm silently installs an older Renovate whose engines - # do match (Node 26 got 37.x, which rejects renovate.json). Kept off - # Node major bumps in renovate.json for that reason. - - name: Setup Node - uses: actions/setup-node@v7 - with: - node-version: "24" - - # Renovate shells out to `bundler lock` for Gemfile.lock updates. - # No checkout in this job, so the version can't come from - # .ruby-version; the major.minor is enough for lockfile work. - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: "4.0.9" - - - name: Install Renovate - # Major pinned for the same reason; bump together with node-version - # above once a new major's engines.node is checked. - run: npm install -g renovate@44 - - name: Run Renovate run: renovate env: @@ -43,6 +27,7 @@ jobs: RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }} RENOVATE_REPOSITORIES: "${{ gitea.repository }}" RENOVATE_ONBOARDING: "false" + RENOVATE_BINARY_SOURCE: install # postUpgradeTasks in renovate.json (vendor re-sync on npm bumps) RENOVATE_ALLOWED_COMMANDS: '["^npm ci( \\S+)*$", "^node bin/vendor-sync\\.mjs$"]' # Secret named GH_COM_TOKEN: Gitea reserves the GITHUB_ prefix. diff --git a/renovate.json b/renovate.json index 1b51834..fb1e6db 100644 --- a/renovate.json +++ b/renovate.json @@ -4,13 +4,6 @@ "timezone": "Europe/Bratislava", "prHourlyLimit": 0, "packageRules": [ - { - "description": "Renovate job's Node must match Renovate's engines.node, see renovate.yml", - "matchFileNames": [".gitea/workflows/renovate.yml"], - "matchDepNames": ["node"], - "matchUpdateTypes": ["major"], - "enabled": false - }, { "description": "package.json only pins public/vendor/, so re-sync the vendored files in the same PR", "matchManagers": ["npm"],