Skip to content

Commit

Permalink
[Do not merge] Prototype GitHub workflows
Browse files Browse the repository at this point in the history
Alternative workflow testing for the unfied GitHub actions project.
  • Loading branch information
emcfarlane committed Apr 30, 2024
1 parent 752f6c6 commit 9ecfca1
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/buf-delete.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Buf delete
on:
delete
permissions: read-all
jobs:
buf-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Buf setup
uses: bufbuild/buf-setup-action@v1
with:
version: 1.32.0-beta.1
- run: buf --version
- name: Buf delete
run: echo "Action not supported for buf"
31 changes: 31 additions & 0 deletions .github/workflows/buf-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Buf PR
on:
pull_request:
types: [opened,synchronize,reopened,labeled,unlabeled]
permissions: read-all
jobs:
buf-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Buf setup
uses: bufbuild/buf-setup-action@v1
with:
version: 1.32.0-beta.1
- run: buf --version
- name: Buf build
run: buf build . --error-format github-actions
- name: Buf format
if: ${{ !contains(github.event.pull_request.labels.*.name, 'Buf Skip Format') }}
run: buf format . --diff --error-format github-actions --exit-code
- name: Buf lint
if: ${{ !contains(github.event.pull_request.labels.*.name, 'Buf Skip Lint') }}
run: buf lint . --error-format github-actions
- name: Checkout base
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.sha }}
path: .base
- name: Buf breaking
if: ${{ !contains(github.event.pull_request.labels.*.name, 'Buf Skip Breaking') }}
run: buf breaking . --error-format github-actions --against .base
32 changes: 32 additions & 0 deletions .github/workflows/buf-push-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Buf push checks
on:
push:
branches:
- main
permissions: read-all
jobs:
buf-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Buf setup
uses: bufbuild/buf-setup-action@v1
with:
version: 1.32.0-beta.1
- run: buf --version
- name: Buf build
run: buf build . --error-format github-actions
- name: Buf format
if: ${{ !contains(github.event.head_commit.message, 'buf skip format') }}
run: buf format . --diff --error-format github-actions --exit-code
- name: Buf lint
if: ${{ !contains(github.event.head_commit.message, 'buf skip lint') }}
run: buf lint . --error-format github-actions
- name: Checkout base
uses: actions/checkout@v4
with:
ref: ${{ gihub.event.before }}
path: .base
- name: Buf breaking
if: ${{ !contains(github.event.head_commit.message, 'buf skip breaking') }}
run: buf breaking . --error-format github-actions --against .base
16 changes: 16 additions & 0 deletions .github/workflows/buf-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Buf push
on:
push
permissions: read-all
jobs:
buf-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Buf setup
uses: bufbuild/buf-setup-action@v1
with:
version: 1.32.0-beta.1
- run: buf --version
- name: Buf push
run: buf push . --error-format=github-actions --git-metadata

0 comments on commit 9ecfca1

Please sign in to comment.