prometheus/.github/workflows/buf.yml
Francis Begyn 9e5cc340c3 stop github actions from sending me mail
Currently github actions keep sending me mails about things that should
only run on the prometheus organisation actions. This change makes sure
to check who owns the repository before running the CI workflow.

Signed-off-by: Francis Begyn <francis@begyn.be>
2023-03-14 18:56:24 +01:00

27 lines
728 B
YAML

name: buf.build
on:
push:
branches:
- main
jobs:
buf:
name: lint and publish
runs-on: ubuntu-latest
if: github.repository_owner == 'prometheus'
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1.13.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: bufbuild/buf-lint-action@v1
with:
input: 'prompb'
- uses: bufbuild/buf-breaking-action@v1
with:
input: 'prompb'
against: 'https://github.com/prometheus/prometheus.git#branch=main,ref=HEAD~1,subdir=prompb'
- uses: bufbuild/buf-push-action@v1
with:
input: 'prompb'
buf_token: ${{ secrets.BUF_TOKEN }}