diff --git a/.github/workflows/build-and-publish-protos.yaml b/.github/workflows/build-and-publish-protos.yaml index e3df936..b9e3c8e 100644 --- a/.github/workflows/build-and-publish-protos.yaml +++ b/.github/workflows/build-and-publish-protos.yaml @@ -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'}} \ No newline at end of file + token: ${{ secrets.BUF_TOKEN }} + pr_comment: false + format: false diff --git a/buf.lock b/buf.lock new file mode 100644 index 0000000..42a6dc6 --- /dev/null +++ b/buf.lock @@ -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 diff --git a/buf.work.yaml b/buf.work.yaml deleted file mode 100644 index 16781f8..0000000 --- a/buf.work.yaml +++ /dev/null @@ -1,5 +0,0 @@ -version: v1 -directories: - - proto/aep-conformance - - proto/aep-type - - proto/aep-api \ No newline at end of file diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 0000000..751a47c --- /dev/null +++ b/buf.yaml @@ -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 diff --git a/proto/aep-api/buf.lock b/proto/aep-api/buf.lock deleted file mode 100644 index 3206fa6..0000000 --- a/proto/aep-api/buf.lock +++ /dev/null @@ -1,13 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: bufbuild - repository: protovalidate - commit: f05a6f4403ce4327bae4f50f281c3ed0 - digest: shake256:668a0661b8df44d41839194896329330965fc215f3d2f88057fd60eeb759c2daf6cc6edfdd13b2a653d49fe2896ebedcb1a33c4c5b2dd10919f03ffb7fc52ae6 - - remote: buf.build - owner: googleapis - repository: googleapis - commit: 7a6bc1e3207144b38e9066861e1de0ff - digest: shake256:d646836485c34192401253703c4e7ce899c826fceec060bf4b2a62c4749bd9976dc960833e134a1f814725e1ffd60b1bb3cf0335a7e99ef0e8cec34b070ffb66 diff --git a/proto/aep-api/buf.yaml b/proto/aep-api/buf.yaml deleted file mode 100644 index ec1de44..0000000 --- a/proto/aep-api/buf.yaml +++ /dev/null @@ -1,13 +0,0 @@ -version: v1 -name: buf.build/aep/api -breaking: - use: - - FILE -lint: - use: - - DEFAULT - except: - - PACKAGE_VERSION_SUFFIX -deps: - - buf.build/googleapis/googleapis - - buf.build/bufbuild/protovalidate diff --git a/proto/aep-conformance/buf.yaml b/proto/aep-conformance/buf.yaml deleted file mode 100644 index ea67fd9..0000000 --- a/proto/aep-conformance/buf.yaml +++ /dev/null @@ -1,12 +0,0 @@ -version: v1 -name: buf.build/aep/conformance -breaking: - use: - - FILE -lint: - use: - - DEFAULT - except: - - PACKAGE_VERSION_SUFFIX - - ENUM_VALUE_PREFIX - - ENUM_ZERO_VALUE_SUFFIX diff --git a/proto/aep-type/aep/type/interval.proto b/proto/aep-type/aep/type/interval.proto index 16695e5..572b00c 100644 --- a/proto/aep-type/aep/type/interval.proto +++ b/proto/aep-type/aep/type/interval.proto @@ -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. diff --git a/proto/aep-type/buf.lock b/proto/aep-type/buf.lock deleted file mode 100644 index 70a6948..0000000 --- a/proto/aep-type/buf.lock +++ /dev/null @@ -1,8 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: bufbuild - repository: protovalidate - commit: 12f9cba37c9d49eeb6827dde227d6031 - digest: shake256:a9470135a1736bdb74396e35342b4431b0bf3a5e7a2198fb77f49be46af744aae134f8e0593683216e836f1f0a551ccf86a9f8857c6829b8d33f4b604602a5ff diff --git a/proto/aep-type/buf.yaml b/proto/aep-type/buf.yaml deleted file mode 100644 index 681cd89..0000000 --- a/proto/aep-type/buf.yaml +++ /dev/null @@ -1,12 +0,0 @@ -version: v1 -name: buf.build/aep/type -breaking: - use: - - FILE -lint: - use: - - DEFAULT - except: - - PACKAGE_VERSION_SUFFIX -deps: - - buf.build/bufbuild/protovalidate \ No newline at end of file