Skip to content

Commit 0c2e268

Browse files
ci: pin cross-gem docker tag to rb-sys version in Cargo.lock
1 parent e42f816 commit 0c2e268

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/build-gems.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,22 @@ jobs:
4646
with:
4747
ruby-version: "3.4"
4848

49+
- name: Detect rb-sys version from Cargo.lock
50+
id: rb-sys
51+
run: |
52+
version="$(awk '/name = "rb-sys"/{flag=1; next} flag && /version = / {gsub(/"/, "", $3); print $3; exit}' Cargo.lock)"
53+
if [ -z "$version" ]; then
54+
echo "Failed to detect rb-sys version from Cargo.lock" >&2
55+
exit 1
56+
fi
57+
echo "version=$version" >> "$GITHUB_OUTPUT"
58+
4959
- uses: oxidize-rb/actions/cross-gem@v1
5060
id: cross-gem
5161
with:
5262
platform: ${{ matrix.ruby-platform }}
5363
ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ',') }}
64+
tag: ${{ steps.rb-sys.outputs.version }}
5465

5566
- uses: actions/upload-artifact@v7
5667
with:

0 commit comments

Comments
 (0)