Skip to content

Commit 8cbe6b5

Browse files
ci: pin the Bun and Deno versions and let Dependabot bump them (#22769)
* ci: pin the Bun and Deno versions and let Dependabot bump them Claude-Session: https://claude.ai/code/session_017TkBWTk3wcyUcJYDp5ZhaP * ci: fail the runtimes job when its version cannot be read Claude-Session: https://claude.ai/code/session_017TkBWTk3wcyUcJYDp5ZhaP
1 parent 3821900 commit 8cbe6b5

3 files changed

Lines changed: 28 additions & 2 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ updates:
7272
dependencies:
7373
patterns:
7474
- "*"
75+
# The Bun and Deno versions the `runtimes` job runs (see the Dockerfile). One
76+
# pull request per release, so a new runtime reds only the bump that brought it.
77+
- package-ecosystem: "docker"
78+
directory: "/.github/runtimes"
79+
schedule:
80+
interval: "weekly"
81+
open-pull-requests-limit: 2
82+
labels:
83+
- dependencies
7584
- package-ecosystem: "gitsubmodule"
7685
directory: "/"
7786
schedule:

‎.github/runtimes/Dockerfile‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Not built: it pins the Bun and Deno versions the `runtimes` job in test.yml
2+
# runs, in a file Dependabot's docker ecosystem keeps up to date. A new release
3+
# then arrives as its own pull request, rather than turning an unrelated one red.
4+
FROM oven/bun:1.4.3 AS bun
5+
FROM denoland/deno:2.9.7 AS deno

‎.github/workflows/test.yml‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,17 +513,29 @@ jobs:
513513
node-version: lts/*
514514
cache: yarn
515515

516+
# The version comes from .github/runtimes/Dockerfile, which Dependabot bumps.
517+
- name: Read the ${{ matrix.runtime }} version
518+
id: runtime
519+
# An empty version would let setup-bun fall back to the latest release.
520+
run: |
521+
version="$(sed -n 's/^FROM [^:]*:\(.*\) AS ${{ matrix.runtime }}$/\1/p' .github/runtimes/Dockerfile)"
522+
if [ -z "$version" ]; then
523+
echo "No ${{ matrix.runtime }} stage in .github/runtimes/Dockerfile" >&2
524+
exit 1
525+
fi
526+
echo "version=$version" >> "$GITHUB_OUTPUT"
527+
516528
- name: Use Deno
517529
if: matrix.runtime == 'deno'
518530
uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5
519531
with:
520-
deno-version: v2.x
532+
deno-version: v${{ steps.runtime.outputs.version }}
521533

522534
- name: Use Bun
523535
if: matrix.runtime == 'bun'
524536
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
525537
with:
526-
bun-version: latest
538+
bun-version: ${{ steps.runtime.outputs.version }}
527539

528540
- run: node tooling/retry.js yarn --frozen-lockfile
529541

0 commit comments

Comments
 (0)