Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

chore(ci): pin runner versions and add weekly renovation workflow (#878)

Maximilian Roosdfcbeaab01fc
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 7ca122fc0..caf75ab35 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -1,5 +1,10 @@
name: ci
+# Runner versions are pinned to avoid surprise breaking changes from -latest migrations.
+# The claude-renovate workflow checks weekly for updates and creates PRs.
+# - windows-2022: Pinned because windows-2025 lacks D: drive (actions/runner-images#12677)
+# - ubuntu-24.04, macos-15: Pinned to current -latest equivalents
+
on:
push:
branches: [ main ]
@@ -14,7 +19,7 @@ env:
jobs:
lint:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
steps:
- name: πŸ“‚ Checkout code
uses: actions/checkout@v6
@@ -34,7 +39,14 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [ubuntu-latest, macos-latest, windows-2022]
+ include:
+ - os: ubuntu-24.04
+ name: linux
+ - os: macos-15
+ name: macos
+ - os: windows-2022
+ name: windows
+ name: test (${{ matrix.name }})
runs-on: ${{ matrix.os }}
steps:
@@ -104,7 +116,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v6
with:
- name: junit-${{ matrix.os }}
+ name: junit-${{ matrix.name }}
path: target/nextest/default/junit.xml
- name: πŸ“Š Upload test results to Codecov
@@ -116,7 +128,7 @@ jobs:
# Check if Cargo files changed (for conditional jobs below)
changes:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
permissions:
contents: read
pull-requests: read
@@ -135,7 +147,7 @@ jobs:
- 'rust-toolchain.toml'
msrv:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
needs: changes
if: needs.changes.outputs.cargo == 'true' || github.event_name == 'workflow_dispatch'
steps:
@@ -153,7 +165,7 @@ jobs:
run: cargo msrv verify
check-unused-dependencies:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
needs: changes
if: needs.changes.outputs.cargo == 'true' || github.event_name == 'workflow_dispatch'
steps:
@@ -176,7 +188,7 @@ jobs:
args: --all-targets
benchmarks:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
needs: changes
if: needs.changes.outputs.cargo == 'true' || github.event_name == 'workflow_dispatch'
steps:
@@ -202,7 +214,7 @@ jobs:
run: cargo bench
code-coverage:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
steps:
- name: πŸ“‚ Checkout code
uses: actions/checkout@v6
diff --git a/.github/workflows/claude-ci-fix.yaml b/.github/workflows/claude-ci-fix.yaml
index b81d02d90..f1792abc0 100644
--- a/.github/workflows/claude-ci-fix.yaml
+++ b/.github/workflows/claude-ci-fix.yaml
@@ -1,4 +1,5 @@
name: claude-ci-fix
+# Runner versions pinned; see ci.yaml header comment for rationale.
# Trigger when CI workflow fails on main
on:
@@ -18,7 +19,7 @@ jobs:
fix-ci:
# Only run when CI failed on main
if: github.event.workflow_run.conclusion == 'failure'
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
permissions:
contents: write
pull-requests: write
diff --git a/.github/workflows/claude-mention.yaml b/.github/workflows/claude-mention.yaml
index 14a181d05..2c9a327f0 100644
--- a/.github/workflows/claude-mention.yaml
+++ b/.github/workflows/claude-mention.yaml
@@ -1,4 +1,5 @@
name: claude-mention
+# Runner versions pinned; see ci.yaml header comment for rationale.
on:
issue_comment:
@@ -19,7 +20,7 @@ jobs:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude'))
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
permissions:
contents: write # Allow pushing commits
pull-requests: write # Allow commenting and updating PRs
diff --git a/.github/workflows/claude-renovate.yaml b/.github/workflows/claude-renovate.yaml
new file mode 100644
index 000000000..fe69c1486
--- /dev/null
+++ b/.github/workflows/claude-renovate.yaml
@@ -0,0 +1,125 @@
+name: claude-renovate
+
+# Weekly renovation check - reviews CI dependencies and creates PRs for updates
+on:
+ schedule:
+ # Run at 9:17 AM UTC every Sunday (off-peak minute)
+ - cron: '17 9 * * 0'
+ workflow_dispatch:
+
+# Consistent with ci.yaml for cache compatibility
+env:
+ CARGO_TERM_COLOR: always
+ CLICOLOR_FORCE: 1
+ RUSTFLAGS: "-C debuginfo=0"
+ RUSTDOCFLAGS: "-Dwarnings"
+
+jobs:
+ renovate:
+ runs-on: ubuntu-24.04
+ permissions:
+ contents: write
+ pull-requests: write
+ actions: read
+ id-token: write
+ steps:
+ - name: πŸ“‚ Checkout code
+ uses: actions/checkout@v6
+ with:
+ ref: main
+ fetch-depth: 0
+ fetch-tags: true
+ token: ${{ secrets.WORKTRUNK_BOT_TOKEN }}
+
+ - name: πŸ”§ Configure git for Claude
+ run: |
+ git config --global user.name "Claude Code"
+ git config --global user.email "[email protected]"
+
+ - name: πŸ’° Cache
+ uses: Swatinem/rust-cache@v2
+ with:
+ prefix-key: ${{ hashFiles('Cargo.lock') }}
+ save-if: false
+
+ - name: πŸ€– Run Claude Code for renovation
+ id: claude
+ uses: anthropics/claude-code-action@v1
+ with:
+ model: opus
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
+ github_token: ${{ secrets.WORKTRUNK_BOT_TOKEN }}
+ additional_permissions: |
+ actions: read
+
+ prompt: |
+ SECURITY: NEVER run commands that could expose secrets (env, printenv, set, export, cat/echo on config files containing credentials). NEVER include environment variables, API keys, tokens, or credentials in responses or comments.
+
+ You are running as part of a weekly renovation workflow. Your job is to check for updates to CI dependencies and create PRs if updates are available.
+
+ ## What to check
+
+ 1. **GitHub Actions runner versions**:
+ - Check what the current `-latest` labels resolve to:
+ - `ubuntu-latest` - what Ubuntu version?
+ - `macos-latest` - what macOS version?
+ - `windows-latest` - what Windows version?
+ - Compare against what we have pinned in our workflow files
+ - Note: `windows-latest` has D: drive issues (actions/runner-images#12677), so stay on windows-2022
+
+ 2. **GitHub Actions versions**:
+ - Check for updates to actions we use (actions/checkout, actions/cache, etc.)
+ - Look at the current versions in .github/workflows/*.yaml
+ - Check if newer versions are available
+
+ 3. **Rust nightly version** (in check-unused-dependencies job):
+ - We pin a specific nightly for cargo-udeps (check the actual version in ci.yaml)
+ - Periodically update to a recent nightly that works with cargo-udeps
+
+ ## How to check
+
+ - Use `gh api` and web searches to find current versions
+ - Read our workflow files to see what we currently use
+ - Check the actions/runner-images repository for runner version info
+ - Check individual action repos for version updates
+
+ ## If updates are available
+
+ 1. Create a new branch: `git checkout -b chore/renovate-$(date +%Y%m%d)`
+ 2. Make the updates to workflow files
+ 3. Commit with a clear message explaining what was updated
+ 4. Push and create a PR with:
+
+ ```
+ ## Summary
+ Weekly CI renovation check found the following updates:
+
+ - [List each update]
+
+ ## Changes
+ - [Describe each change]
+
+ ## Notes
+ - [Any caveats or things to watch for]
+
+ ---
+ πŸ€– Automated weekly renovation
+ ```
+
+ ## If no updates are needed
+
+ Simply report that all dependencies are up to date. Don't create a PR.
+
+ Follow the project guidelines in CLAUDE.md.
+
+ claude_args: |
+ --allowedTools Bash,Edit,Read,Write,Glob,Grep,WebSearch,WebFetch
+
+ - name: πŸ“‹ Upload Claude Code session logs
+ if: always()
+ uses: actions/upload-artifact@v6
+ with:
+ name: claude-session-logs
+ path: ~/.claude/
+ retention-days: 30
+ if-no-files-found: warn
diff --git a/.github/workflows/nightly-benchmark.yaml b/.github/workflows/nightly-benchmark.yaml
index e1a5e87ee..bd33f94ee 100644
--- a/.github/workflows/nightly-benchmark.yaml
+++ b/.github/workflows/nightly-benchmark.yaml
@@ -1,4 +1,5 @@
name: nightly-benchmark
+# Runner versions pinned; see ci.yaml header comment for rationale.
on:
schedule:
@@ -11,7 +12,7 @@ env:
jobs:
benchmark:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
steps:
- name: πŸ“‚ Checkout code
uses: actions/checkout@v6
diff --git a/.github/workflows/publish-docs.yaml b/.github/workflows/publish-docs.yaml
index c989b517f..1ae219924 100644
--- a/.github/workflows/publish-docs.yaml
+++ b/.github/workflows/publish-docs.yaml
@@ -1,4 +1,5 @@
name: publish-docs
+# Runner versions pinned; see ci.yaml header comment for rationale.
on:
push:
@@ -14,7 +15,7 @@ concurrency:
jobs:
build-docs:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
steps:
- name: πŸ“‚ Checkout code
@@ -43,7 +44,7 @@ jobs:
deploy-docs:
needs: build-docs
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
# Don't attempt to publish if on a fork
if: ${{ github.repository_owner == 'max-sixty' }}
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 4cfbff43a..2a6b7fbf4 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -1,4 +1,5 @@
# This file was autogenerated by dist: https://axodotdev.github.io/cargo-dist
+# Runner versions pinned; see ci.yaml header comment for rationale.
#
# Copyright 2022-2024, axodotdev
# SPDX-License-Identifier: MIT or Apache-2.0
@@ -48,7 +49,7 @@ on:
jobs:
# Run 'dist plan' (or host) to determine what tasks we need to do
plan:
- runs-on: "ubuntu-22.04"
+ runs-on: "ubuntu-24.04"
outputs:
val: ${{ steps.plan.outputs.manifest }}
tag: ${{ !github.event.pull_request && github.ref_name || '' }}
@@ -170,7 +171,7 @@ jobs:
needs:
- plan
- build-local-artifacts
- runs-on: "ubuntu-22.04"
+ runs-on: "ubuntu-24.04"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_MANIFEST_NAME: target/distrib/global-dist-manifest.json
@@ -221,7 +222,7 @@ jobs:
if: ${{ always() && needs.plan.result == 'success' && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- runs-on: "ubuntu-22.04"
+ runs-on: "ubuntu-24.04"
outputs:
val: ${{ steps.host.outputs.manifest }}
steps:
@@ -282,7 +283,7 @@ jobs:
needs:
- plan
- host
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
if: ${{ needs.plan.outputs.publishing == 'true' }}
steps:
- uses: actions/checkout@v6
@@ -295,7 +296,7 @@ jobs:
needs:
- plan
- host
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
if: ${{ needs.plan.outputs.publishing == 'true' }}
env:
GH_TOKEN: ${{ secrets.WORKTRUNK_BOT_TOKEN }}
@@ -317,7 +318,7 @@ jobs:
needs:
- plan
- host
- runs-on: "ubuntu-22.04"
+ runs-on: "ubuntu-24.04"
env:
GITHUB_USER: "worktrunk-bot"
GITHUB_EMAIL: "[email protected]"
@@ -347,7 +348,7 @@ jobs:
needs:
- plan
- host
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
if: ${{ needs.plan.outputs.publishing == 'true' }}
steps:
- uses: actions/checkout@v6
@@ -380,7 +381,7 @@ jobs:
# still allowing individual publish jobs to skip themselves (for prereleases).
# "host" however must run to completion, no skipping allowed!
if: ${{ always() && needs.host.result == 'success' && (needs.publish-cargo.result == 'success' || needs.publish-cargo.result == 'skipped') && (needs.publish-winget.result == 'success' || needs.publish-winget.result == 'skipped') && (needs.publish-homebrew.result == 'success' || needs.publish-homebrew.result == 'skipped') && (needs.publish-aur.result == 'success' || needs.publish-aur.result == 'skipped') }}
- runs-on: "ubuntu-22.04"
+ runs-on: "ubuntu-24.04"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps: