Files
buf-action/examples/only-setup-defaults/buf-ci.yaml
T
action-mirror 38d0d7e18f
Buf action CI / build (push) Canceled after 0s
Buf action CI / test-setup (push) Canceled after 0s
Buf action CI / test-setup-latest (push) Canceled after 0s
Buf action CI / test-setup-macos (push) Canceled after 0s
Buf action CI / test-setup-windows (push) Canceled after 0s
Buf action CI / test-setup-self-hosted (push) Canceled after 0s
Buf action CI / test-empty-build (push) Canceled after 0s
Buf action CI / test-lint (push) Canceled after 0s
Buf action CI / test-format (push) Canceled after 0s
Buf action CI / test-breaking (push) Canceled after 0s
Buf action CI / test-comment (push) Canceled after 0s
Buf action CI / test-push (push) Canceled after 0s
Buf action CI / test-push-token-only (push) Canceled after 0s
Buf action CI / test-push-unnamed (push) Canceled after 0s
Buf action CI / test-archive (push) Canceled after 0s
Buf action CI / test-archive-root (push) Canceled after 0s
Buf action CI / test-archive-unnamed (push) Canceled after 0s
mirror bufbuild/buf-action@v1.1.1
2026-11-09 01:03:09 +08:00

36 lines
1.6 KiB
YAML

# This file showcases the Buf CI workflow in a step by step breakdown.
# Based on the buf-ci.yaml file, this action walks through the Buf CI workflow
# and shows what each step does.
name: Buf CI
on:
push:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
delete:
permissions:
contents: read
jobs:
buf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v1
with:
setup_only: true
- env:
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
run: echo ${BUF_TOKEN} | buf registry login buf.build --token-stdin
- run: buf build --error-format=github-actions
- if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'buf skip lint') }}
run: buf lint --error-format github-actions
- if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'buf skip format') }}
run: buf format --diff --error-format github-actions --exit-code
- if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'buf skip breaking') }}
run: |
buf breaking --error-format github-actions --against \
${{ github.event.repository.clone_url }}#format=git,tag=${{ github.event.pull_request.base.sha || github.event.before }}
- if: ${{ github.event_name == 'push' }}
run: buf push --error-format github-actions --create --git-metadata
- if: ${{ github.event_name == 'delete' }}
run: buf beta registry archive --label ${{ github.ref_name }}