forked from viamrobotics/api
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.32 KB
/
pullrequest.yml
File metadata and controls
40 lines (37 loc) · 1.32 KB
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
name: Pull Request Update
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
pull_request_target:
branches: [ 'main' ]
types: [opened, synchronize, reopened, unlabeled, labeled]
jobs:
test:
name: Test For Lint and Breaking Changes
if: contains(github.event.pull_request.labels.*.name, 'safe to test')
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac
with:
install: false
experimental: true
- name: Extract buf version from mise
id: buf-version
run:
echo "version=$(mise tool buf --active)" >> $GITHUB_OUTPUT
- uses: bufbuild/buf-setup-action@a47c93e0b1648d5651a065437926377d060baa99
with:
version: ${{ steps.buf-version.outputs.version }}
# Run all Lint runs
- uses: bufbuild/buf-lint-action@v1
# Run breaking change detection against the `main` branch
- uses: bufbuild/buf-breaking-action@c57b3d842a5c3f3b454756ef65305a50a587c5ba
if: ${{ !contains(github.event.pull_request.labels.*.name, 'allow breaking') }}
with:
against: 'https://github.com/viamrobotics/api.git#branch=main'