fix(cicd): install buf from GitHub releases instead of broken buf-bin repo
CI/CD Stage / stage (push) Failing after 25s
CI/CD Stage / stage (push) Failing after 25s
This commit is contained in:
@@ -1,24 +1,30 @@
|
|||||||
name: Build Proto
|
name: Build Proto
|
||||||
description: Install buf CLI, run buf lint and buf build
|
description: Install buf CLI, run buf lint and buf build
|
||||||
inputs:
|
inputs:
|
||||||
buf_ref:
|
buf_version:
|
||||||
description: Git ref of actions/buf-bin to checkout
|
description: Buf CLI version to install
|
||||||
required: false
|
required: false
|
||||||
default: "main"
|
default: "1.72.0"
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Buf CLI
|
|
||||||
uses: https://git.darano.ir/actions/checkout@v5
|
|
||||||
with:
|
|
||||||
repository: actions/buf-bin
|
|
||||||
ref: ${{ inputs.buf_ref }}
|
|
||||||
path: buf-bin
|
|
||||||
- name: Setup Buf CLI
|
- name: Setup Buf CLI
|
||||||
shell: bash
|
shell: bash
|
||||||
|
env:
|
||||||
|
BUF_VERSION: ${{ inputs.buf_version }}
|
||||||
run: |
|
run: |
|
||||||
cp buf-bin/buf /usr/local/bin/buf
|
ARCH="$(uname -m)"
|
||||||
|
case "$ARCH" in
|
||||||
|
x86_64) BIN="buf-Linux-x86_64" ;;
|
||||||
|
aarch64) BIN="buf-Linux-aarch64" ;;
|
||||||
|
arm64) BIN="buf-Darwin-arm64" ;;
|
||||||
|
*) BIN="buf-Linux-x86_64" ;;
|
||||||
|
esac
|
||||||
|
curl -sSL "https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/${BIN}.tar.gz" -o buf.tar.gz
|
||||||
|
tar -xzf buf.tar.gz
|
||||||
|
cp buf /usr/local/bin/buf
|
||||||
chmod +x /usr/local/bin/buf
|
chmod +x /usr/local/bin/buf
|
||||||
|
rm -rf buf buf.tar.gz
|
||||||
- name: Lint
|
- name: Lint
|
||||||
shell: bash
|
shell: bash
|
||||||
run: buf lint
|
run: buf lint
|
||||||
|
|||||||
@@ -24,8 +24,19 @@ jobs:
|
|||||||
uses: ./.gitea/actions/setup-mirrors
|
uses: ./.gitea/actions/setup-mirrors
|
||||||
- name: Setup Buf CLI
|
- name: Setup Buf CLI
|
||||||
run: |
|
run: |
|
||||||
cp buf-bin/buf /usr/local/bin/buf
|
BUF_VERSION=1.72.0
|
||||||
|
ARCH="$(uname -m)"
|
||||||
|
case "$ARCH" in
|
||||||
|
x86_64) BIN="buf-Linux-x86_64" ;;
|
||||||
|
aarch64) BIN="buf-Linux-aarch64" ;;
|
||||||
|
arm64) BIN="buf-Darwin-arm64" ;;
|
||||||
|
*) BIN="buf-Linux-x86_64" ;;
|
||||||
|
esac
|
||||||
|
curl -sSL "https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/${BIN}.tar.gz" -o buf.tar.gz
|
||||||
|
tar -xzf buf.tar.gz
|
||||||
|
cp buf /usr/local/bin/buf
|
||||||
chmod +x /usr/local/bin/buf
|
chmod +x /usr/local/bin/buf
|
||||||
|
rm -rf buf buf.tar.gz buf-bin
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: buf lint
|
run: buf lint
|
||||||
- name: Build
|
- name: Build
|
||||||
|
|||||||
Reference in New Issue
Block a user