Skip to content

Commit d4387fc

Browse files
committed
ci: use pinned taplo-cli revision matching windows-drivers-rs
The install-cargo-tool action assumes crate name == binary name, which breaks for taplo-cli (binary is taplo, not taplo-cli). Switch to cache-cargo-install-action with the same pinned revision (b673b44d) used by windows-drivers-rs, pending a taplo release with field-level keys matching support.
1 parent 0ba7a58 commit d4387fc

1 file changed

Lines changed: 10 additions & 16 deletions

File tree

.github/workflows/code-formatting-check.yaml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,21 @@ jobs:
3636
- name: Checkout Repository
3737
uses: actions/checkout@v4
3838

39-
- name: Checkout windows-drivers-rs actions
40-
uses: actions/checkout@v4
41-
with:
42-
repository: microsoft/windows-drivers-rs
43-
ref: main
44-
path: _temp/windows-drivers-rs
45-
sparse-checkout: |
46-
.github/actions
47-
sparse-checkout-cone-mode: false
48-
49-
- name: Copy actions to workspace
50-
shell: pwsh
51-
run: Copy-Item -Recurse -Force _temp/windows-drivers-rs/.github/actions .github/
52-
5339
- name: Install Rust Toolchain (Stable)
5440
uses: dtolnay/rust-toolchain@stable
5541

56-
- name: Install taplo-cli
57-
uses: ./.github/actions/install-cargo-tool
42+
# Using cache-cargo-install-action to cache the compiled binary.
43+
# Once taplo ships a release with field-level `keys` matching, this can
44+
# be simplified back to install-action with a normal version pin.
45+
- name: Install taplo-cli from pinned revision b673b44d
46+
uses: taiki-e/cache-cargo-install-action@v3
5847
with:
5948
tool: taplo-cli
49+
git: https://github.com/tamasfe/taplo
50+
rev: b673b44d
51+
locked: true
52+
env:
53+
RUSTFLAGS: ""
6054

6155
- run: taplo fmt --check --diff
6256
name: Check TOML files formatting

0 commit comments

Comments
 (0)