Skip to content

Merge pull request #29 from aserto-dev/upd-buf #116

Merge pull request #29 from aserto-dev/upd-buf

Merge pull request #29 from aserto-dev/upd-buf #116

Workflow file for this run

name: build
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
push:
branches:
- main
tags:
- 'v*.*.*'
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches:
- main
delete:
permissions:
contents: read
pull-requests: write
env:
BUF_VERSION: "1.61.0"
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Buf Build
uses: bufbuild/buf-action@v1
with:
version: ${{ env.BUF_VERSION }}
token: ${{ secrets.ASERTO_BUF_TOKEN}}
github_token: ${{ secrets.GITHUB_TOKEN}}
push_disable_create: true
trigger-dispatches:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
strategy:
matrix:
cfg:
- { project: go-authorizer }
- { project: node-authorizer }
- { project: dotnet-authorizer }
- { project: ruby-authorizer }
- { project: python-authorizer }
- { project: openapi-authorizer }
- { project: java-authorizer }
name: Generate on ${{ matrix.cfg.project }}
steps:
-
name: Trigger dispatch
run: |
curl -XPOST -u "${GH_USERNAME}:${GH_TOKEN}" \
-H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" \
https://api.github.com/repos/aserto-dev/${{ matrix.cfg.project }}/actions/workflows/ci.yaml/dispatches --data '{"ref": "main", "inputs": {"proto_ref": "${{ github.ref }}", "proto_sha": "${{ github.sha }}" }}'
env:
GH_USERNAME: ${{ secrets.USERNAME }}
GH_TOKEN: $${{ secrets.READ_WRITE_TOKEN }}