Files
proto/.gitea/actions/build-proto/action.yml
T
2026-08-06 21:21:46 +03:30

34 lines
931 B
YAML

name: Build Proto
description: Install buf CLI, run buf lint and buf build
inputs:
buf_version:
description: Buf CLI version to install
required: false
default: "1.72.0"
runs:
using: composite
steps:
- name: Setup Buf CLI
shell: bash
env:
BUF_VERSION: ${{ inputs.buf_version }}
run: |
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
- name: Build
shell: bash
run: buf build