From 74d8edb8368a099573f03e037e17f74716af0f94 Mon Sep 17 00:00:00 2001 From: Nathaniel McCallum Date: Fri, 30 Oct 2026 08:48:42 -0400 Subject: [PATCH 1/2] ci: use release v7.0.1 of the checkout step GitHub runs a set of automatic checks on each change. The files in .github/workflows list those checks. Each check starts with actions/checkout. That is a step from GitHub that downloads the code before the checks run. This change makes every check use release v7.0.1 of that step. The label v7.0.1 always names that one release. A label like v7 can be moved to a newer release later, which could change what the step does. The change edits 11 lines in docs.yml, security.yml and workspace.yml. Nothing else changes. --- .github/workflows/docs.yml | 2 +- .github/workflows/security.yml | 2 +- .github/workflows/workspace.yml | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c87c5b9..a7c71d0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 30 steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v7.0.1 - uses: dtolnay/rust-toolchain@stable - name: cargo doc run: cargo doc --workspace --no-deps --all-features diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index d1bc122..227149c 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 30 steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v7.0.1 - uses: dtolnay/rust-toolchain@stable - name: Install cargo-audit run: cargo install cargo-audit --version 0.22.2 --locked diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index e303003..0e59ce8 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 30 steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v7.0.1 - uses: korandoru/hawkeye@v6 commit-messages: @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 30 steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v7.0.1 with: fetch-depth: 0 - name: Check commit messages @@ -40,7 +40,7 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 30 steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v7.0.1 - uses: EmbarkStudios/cargo-deny-action@v2 with: command: check @@ -50,7 +50,7 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 30 steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v7.0.1 - uses: dtolnay/rust-toolchain@stable with: components: rustfmt @@ -62,7 +62,7 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 30 steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v7.0.1 - uses: dtolnay/rust-toolchain@stable with: components: clippy @@ -75,7 +75,7 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 30 steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v7.0.1 - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - name: Install reference tools @@ -158,7 +158,7 @@ jobs: matrix: os: [macos-15, windows-2025] steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v7.0.1 - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - name: Test portable crates @@ -173,7 +173,7 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 30 steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v7.0.1 - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - name: Install kernel test tools @@ -215,7 +215,7 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 30 steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v7.0.1 - uses: dtolnay/rust-toolchain@1.87.0 - uses: Swatinem/rust-cache@v2 - name: Compile all targets at the minimum Rust version From 8d41716256a85eecbf7be7995850f740ceb3425a Mon Sep 17 00:00:00 2001 From: Nathaniel McCallum Date: Fri, 30 Oct 2026 08:48:42 -0400 Subject: [PATCH 2/2] ci: check the message of every commit One of the automatic checks reads commit messages. It tests them against the rules in the .gitlint file, using a tool called gitlint. This change makes that check look at every commit in a change: - For a pull request, it checks every commit that is not yet on the branch the pull request targets. - For a push, it checks every commit added since the last commit that was already on that branch. - If that commit is missing, the branch is new, or the push replaced it, it checks every commit that is not yet on the main branch. If there are none, the check passes. This catches a bad message in any of these commits, not just in the newest one. --- .github/workflows/workspace.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index 0e59ce8..4fff553 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -33,7 +33,25 @@ jobs: with: fetch-depth: 0 - name: Check commit messages - run: pipx run --spec gitlint==0.19.1 gitlint --commits HEAD + env: + PR_BASE: ${{ github.base_ref }} + PUSH_BEFORE: ${{ github.event.before }} + run: | + if [ -n "$PR_BASE" ]; then + commit_range="origin/$PR_BASE..HEAD" + elif [ -n "$PUSH_BEFORE" ] && [ "$PUSH_BEFORE" != "0000000000000000000000000000000000000000" ] && + git cat-file -e "$PUSH_BEFORE^{commit}" 2>/dev/null && + git merge-base --is-ancestor "$PUSH_BEFORE" HEAD; then + commit_range="$PUSH_BEFORE..HEAD" + else + git fetch --no-tags origin main:refs/remotes/origin/main + commit_range="origin/main..HEAD" + if [ "$(git rev-list --count "$commit_range")" -eq 0 ]; then + echo "No new commits to check" + exit 0 + fi + fi + pipx run --spec gitlint==0.19.1 gitlint --commits "$commit_range" cargo-deny: name: cargo-deny