-
Notifications
You must be signed in to change notification settings - Fork 9
46 lines (43 loc) · 1.34 KB
/
ci-cd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: CI/CD
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
permissions:
contents: read
pull-requests: read
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1
with:
version: "1.19.0"
github_token: ${{ github.token }}
- uses: bufbuild/buf-lint-action@v1
- uses: bufbuild/buf-breaking-action@v1
with:
# The 'main' branch of the GitHub repository that defines the module.
against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=main"
trigger-remote-build:
needs: check
if: ${{ github.ref == 'refs/heads/main' }}
strategy:
matrix:
repo: ['massalabs/massa-proto-rs']
runs-on: ubuntu-latest
steps:
- name: Trigger proto bindings remote build
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.CI_PROTO_GENERATION }}
repository: ${{ matrix.repo }}
event-type: remote-build
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'