Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions .github/workflows/renovate-shrinkwrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: Renovate shrinkwrap

# Renovate edits package.json but does not understand Rush (renovatebot/renovate#3681): it leaves
# common/config/rush/pnpm-lock.yaml stale, and `rush install` fails on an outdated shrinkwrap.
# After a Renovate dependency PR opens or updates, run `rush update` here, push the refreshed
# shrinkwrap, and re-dispatch CI on the new commit: a push made with the GITHUB_TOKEN does not
# trigger the pull_request synchronize event by itself, so ci.yml must also allow workflow_dispatch.
# Run `rush update` on every Renovate branch, push the refreshed shrinkwrap, and re-dispatch CI on
# the new commit. Both triggers are needed: Renovate defaults to prCreation "pending", so the
# branch often exists before its pull request does (push event), and later commits land on the
# already-opened PR (pull_request event). A push made with the GITHUB_TOKEN does not trigger
# either event by itself, so ci.yml must also allow workflow_dispatch.

on:
pull_request:
Expand All @@ -14,24 +16,27 @@ on:
- "rush.json"
- "common/config/rush/pnpm-config.json"
- "renovate.json"
push:
branches:
- "renovate/**"

permissions:
contents: write

concurrency:
group: renovate-shrinkwrap-${{ github.event.pull_request.number }}
group: renovate-shrinkwrap-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
shrinkwrap:
if: startsWith(github.head_ref, 'renovate/')
if: startsWith(github.head_ref || github.ref_name, 'renovate/')
name: shrinkwrap
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
with:
ref: ${{ github.head_ref }}
ref: ${{ github.head_ref || github.ref_name }}
fetch-depth: 0
- uses: actions/setup-node@v7
with:
Expand All @@ -49,7 +54,7 @@ jobs:
- name: Push the refreshed shrinkwrap and re-dispatch CI
env:
GH_TOKEN: ${{ github.token }}
BRANCH: ${{ github.head_ref }}
BRANCH: ${{ github.head_ref || github.ref_name }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
Expand Down
11 changes: 11 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@
"matchUpdateTypes": ["major"],
"enabled": false
},
{
// The runtime itself is pinned in lockstep across .node-version, rush.json
// nodeSupportedVersionRange and the workflows; bots move them together or not at all.
"matchManagers": ["npm"],
"matchDatasources": ["node-version"],
"enabled": false
},
{
"matchDepTypes": ["engines", "devEngines.runtime"],
"enabled": false
},
{
// lint-config is a git dependency whose upgrades land with their code fixes; Renovate misreads
// its tags and proposes downgrades (v0.5.0 -> v0.3.2).
Expand Down
Loading