mirror of
https://github.com/warmbly/warmbly.git
synced 2026-11-30 00:06:09 +00:00
Merge pull request #1031 from warmbly/feat/ci-pinned-protoc
Install a pinned, digest-verified protoc in Go CI
This commit is contained in:
@@ -181,11 +181,20 @@ jobs:
|
||||
go-version-file: go.mod
|
||||
cache: true
|
||||
|
||||
# A pinned release verified by digest; resolving "latest" lists every protobuf release and fails when that listing is cut short.
|
||||
- name: Set up protoc
|
||||
uses: arduino/setup-protoc@v3
|
||||
with:
|
||||
version: "33.x"
|
||||
repo-token: ${{ github.token }}
|
||||
env:
|
||||
PROTOC_VERSION: "33.6"
|
||||
PROTOC_SHA256: 9c49962391ff8b5754342509efc3885db91dfe11a358e1e98c9a71518f0ad199
|
||||
run: |
|
||||
set -eu
|
||||
archive="$RUNNER_TEMP/protoc.zip"
|
||||
curl -fsSL --retry 5 --retry-all-errors -o "$archive" \
|
||||
"https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip"
|
||||
echo "${PROTOC_SHA256} ${archive}" | sha256sum -c -
|
||||
unzip -q -o "$archive" -d "$RUNNER_TEMP/protoc"
|
||||
echo "$RUNNER_TEMP/protoc/bin" >> "$GITHUB_PATH"
|
||||
"$RUNNER_TEMP/protoc/bin/protoc" --version
|
||||
|
||||
- name: Install required Go tools
|
||||
run: make setup-tools
|
||||
|
||||
Reference in New Issue
Block a user