Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade buf yaml config and CI #14

Merged
merged 6 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions .github/workflows/build-and-publish-protos.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
---
name: build-and-publish-protos
name: build-test-and-publish-protos
on:
push:
paths:
- .github/workflows/build-and-publish-protos.yaml
- 'proto/**'
- buf.yaml
- buf.lock
pull_request:
paths:
- 'proto/**/*.proto'
- .github/workflows/build-and-publish-protos.yaml
- 'proto/**'
- buf.yaml
- buf.lock
types: [opened, synchronize, reopened, labeled, unlabeled]
delete:
permissions:
contents: read
pull-requests: write
jobs:
build-and-publish-protos:
buf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: bufbuild/buf-setup-action@v1.19.0

- name: Verify that protos build.
run: buf build

- id: push-aep-type
uses: bufbuild/buf-push-action@v1
with:
buf_token: ${{ secrets.BUF_TOKEN }}
input: proto/aep-type
draft: ${{ github.ref_name != 'main'}}

- id: push-aep-api
uses: bufbuild/buf-push-action@v1
- uses: actions/checkout@v4
- uses: bufbuild/buf-action@v0.2
with:
buf_token: ${{ secrets.BUF_TOKEN }}
input: proto/aep-api
draft: ${{ github.ref_name != 'main'}}
token: ${{ secrets.BUF_TOKEN }}
pr_comment: false
format: false
9 changes: 9 additions & 0 deletions buf.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Generated by buf. DO NOT EDIT.
version: v2
deps:
- name: buf.build/bufbuild/protovalidate
commit: f05a6f4403ce4327bae4f50f281c3ed0
digest: b5:f1d76430ee97c89cd2044e9ae1c510887b701ee7bca60564ebf82e3919e53cacefc830a0eb803277c2d98c5f313b4167e8914afc9f214332717a50b5e170e6f4
- name: buf.build/googleapis/googleapis
commit: 7a6bc1e3207144b38e9066861e1de0ff
digest: b5:6d05bde5ed4cd22531d7ca6467feb828d2dc45cc9de12ce3345fbddd64ddb1bf0db756558c32ca49e6bc7de4426ada8960d5590e8446854b81f5f36f0916dc48
5 changes: 0 additions & 5 deletions buf.work.yaml

This file was deleted.

55 changes: 55 additions & 0 deletions buf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
version: v2
modules:
- path: proto/aep-api
name: buf.build/aep/api
lint:
use:
- DEFAULT
except:
- FIELD_NOT_REQUIRED
- PACKAGE_NO_IMPORT_CYCLE
- PACKAGE_VERSION_SUFFIX
disallow_comment_ignores: true
breaking:
use:
- FILE
except:
- EXTENSION_NO_DELETE
- FIELD_SAME_DEFAULT
- path: proto/aep-conformance
name: buf.build/aep/conformance
lint:
use:
- DEFAULT
except:
- ENUM_VALUE_PREFIX
- ENUM_ZERO_VALUE_SUFFIX
- FIELD_NOT_REQUIRED
- PACKAGE_NO_IMPORT_CYCLE
- PACKAGE_VERSION_SUFFIX
disallow_comment_ignores: true
breaking:
use:
- FILE
except:
- EXTENSION_NO_DELETE
- FIELD_SAME_DEFAULT
- path: proto/aep-type
name: buf.build/aep/type
lint:
use:
- DEFAULT
except:
- FIELD_NOT_REQUIRED
- PACKAGE_NO_IMPORT_CYCLE
- PACKAGE_VERSION_SUFFIX
disallow_comment_ignores: true
breaking:
use:
- FILE
except:
- EXTENSION_NO_DELETE
- FIELD_SAME_DEFAULT
deps:
- buf.build/bufbuild/protovalidate
- buf.build/googleapis/googleapis
13 changes: 0 additions & 13 deletions proto/aep-api/buf.lock

This file was deleted.

13 changes: 0 additions & 13 deletions proto/aep-api/buf.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions proto/aep-conformance/buf.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion proto/aep-type/aep/type/interval.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ message Interval {
option (buf.validate.message).cel = {
id: "Interval.non-empty",
message: "start must be <= end",
expression: "this.start <= this.end",
expression: "this.start_time <= this.end_time",
};

// Optional. Inclusive start of the interval.
Expand Down
8 changes: 0 additions & 8 deletions proto/aep-type/buf.lock

This file was deleted.

12 changes: 0 additions & 12 deletions proto/aep-type/buf.yaml

This file was deleted.

Loading