Skip to content

Commit 9026a41

Browse files
committed
fix(ci): install mikefarah/yq dependency
yq is used to read the current rustc version from the rust-toolchain.toml file.
1 parent f4df0fb commit 9026a41

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/test.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,23 @@ jobs:
9999
ref: ${{ github.event.pull_request.head.sha }}
100100
submodules: recursive
101101

102-
- name: 'Install yq'
103-
uses: mikefarah/yq-action@v4
102+
- name: Install yq
103+
run: |
104+
set -euo pipefail
105+
YQ_VERSION="v4.52.4"
106+
mkdir -p "$HOME/.local/bin"
107+
wget -qO "$HOME/.local/bin/yq" \
108+
"https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64"
109+
chmod +x "$HOME/.local/bin/yq"
110+
echo "$HOME/.local/bin" >> $GITHUB_PATH
111+
yq --version
112+
104113
105114
- name: 'Read rustc commit from rust-toolchain.toml'
106115
id: rustc-meta
107116
run: |
108117
set -euo pipefail
109-
COMMIT=$(yq -r '.metadata.rustc-commit' rust-toolchain.toml)
118+
COMMIT=$(yq '.metadata.rustc-commit' rust-toolchain.toml)
110119
if [ -z "$COMMIT" ] || [ "$COMMIT" = "null" ]; then
111120
echo "::error::metadata.rustc-commit not found in rust-toolchain.toml"
112121
exit 1
@@ -140,7 +149,7 @@ jobs:
140149
strategy:
141150
fail-fast: false
142151
matrix:
143-
runner: [normal, MacM1] # MacM1 / normal are self-hosted,
152+
runner: [normal, MacM1] # MacM1 / normal are self-hosted,
144153
runs-on: ${{ matrix.runner }}
145154
timeout-minutes: 20
146155
steps:

0 commit comments

Comments
 (0)