v2: test env

Signed-off-by: nfel <nfilsaraee@gmail.com>
This commit is contained in:
nfel 2024-11-20 16:40:12 +03:30
parent 4fa656c614
commit 1c3dcd1cbe
Signed by: nfel
GPG Key ID: DCC0BF3F92B0D45F

View File

@ -2,9 +2,8 @@
name: Buf CI name: Buf CI
on: on:
push: push:
pull_request: tags:
types: [opened, synchronize, reopened, labeled, unlabeled] - v*
delete:
permissions: permissions:
contents: read contents: read
pull-requests: write pull-requests: write
@ -12,17 +11,39 @@ jobs:
buf: buf:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/setup-go@v5 - run: |
with: echo ${{ gitea.action }}
go-version: '>=1.18.0' echo ${{ gitea.event_name }}
- uses: bufbuild/buf-setup-action@v1.47.2 echo ${{ gitea.ref }}
- run: go install google.golang.org/protobuf/cmd/protoc-gen-go@latest echo ${{ gitea.base_ref }}
- run: go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest echo ${{ gitea.ref_name }}
- run: npm install -g @bufbuild/protobuf @bufbuild/protoc-gen-es @bufbuild/buf echo ${{ gitea.repository }}
- run: buf --version echo ${{ gitea.server_url }}
- uses: actions/checkout@v4 echo ${{ gitea.token }}
with: echo ${{ gitea.api_url }}
token: ${{ secrets.PROD_REG_TOKEN }} echo ${{ gitea }}
path: ./ echo ${{ gitea.repo }}
- run: npx buf generate || cat -A /root/.npm/_logs/*.log
- run: cat -A /root/.npm/_logs/*.log # - uses: actions/setup-go@v5
# with:
# go-version: '>=1.18.0'
# - uses: bufbuild/buf-setup-action@v1.47.2
# - run: go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
# - run: go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
# - run: npm install --save-dev
# - run: buf --version
# - uses: actions/checkout@v4
# with:
# token: ${{ secrets.PROD_REG_TOKEN }}
# path: ./
# - run: npx buf generate
# - run: |
# mkdir .res
# for out in go ts docs; do
# tar czf .res/${out}.tar.gz ./stub/${out}/ .
# curl --user nfel:${{ secrets.PROD_REG_TOKEN }} \
# --upload-file .res/${out}.tar.gz \
# https://git.kahrobatoken.com/api/packages/kahroba/generic/proto/${{ gitea.event }}/${out}.tar.gz
# done
#
#