Compare commits
2 Commits
69face9689
..
stage
| Author | SHA1 | Date | |
|---|---|---|---|
| 892ffc25d4 | |||
| 30aab95555 |
@@ -1,24 +1,30 @@
|
||||
name: Build Proto
|
||||
description: Install buf CLI, run buf lint and buf build
|
||||
inputs:
|
||||
buf_ref:
|
||||
description: Git ref of actions/buf-bin to checkout
|
||||
buf_version:
|
||||
description: Buf CLI version to install
|
||||
required: false
|
||||
default: "main"
|
||||
default: "1.72.0"
|
||||
runs:
|
||||
using: composite
|
||||
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
|
||||
shell: bash
|
||||
env:
|
||||
BUF_VERSION: ${{ inputs.buf_version }}
|
||||
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/bin/buf /usr/local/bin/buf
|
||||
chmod +x /usr/local/bin/buf
|
||||
rm -rf buf buf.tar.gz
|
||||
- name: Lint
|
||||
shell: bash
|
||||
run: buf lint
|
||||
|
||||
@@ -24,8 +24,19 @@ jobs:
|
||||
uses: ./.gitea/actions/setup-mirrors
|
||||
- name: Setup Buf CLI
|
||||
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/bin/buf /usr/local/bin/buf
|
||||
chmod +x /usr/local/bin/buf
|
||||
rm -rf buf buf.tar.gz buf-bin
|
||||
- name: Lint
|
||||
run: buf lint
|
||||
- name: Build
|
||||
|
||||
Reference in New Issue
Block a user