diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7e9aa86db4..899b21a02d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -451,3 +451,35 @@ jobs: with: name: artifacts path: ./out/artifacts + + + protobuf-schemas: + runs-on: ubuntu-22.04 + needs: detect-noop + if: needs.detect-noop.outputs.noop != 'true' + + steps: + + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + + - name: Setup Buf + uses: bufbuild/buf-setup-action@v1 + + - name: Lint Protocol Buffers + uses: bufbuild/buf-lint-action@v1 + with: + input: apis + + - name: Detect Breaking Changes in Protocol Buffers + uses: bufbuild/buf-breaking-action@v1 + with: + input: apis + against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=master,subdir=apis" + + - name: Push Protocol Buffers to Buf Schema Registry + if: github.ref == 'refs/heads/master' + uses: bufbuild/buf-push-action@v1 + with: + input: apis + buf_token: ${{ secrets.BUF_TOKEN }} \ No newline at end of file diff --git a/apis/buf.lock b/apis/buf.lock new file mode 100644 index 00000000000..7f8e753487e --- /dev/null +++ b/apis/buf.lock @@ -0,0 +1,7 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: protocolbuffers + repository: wellknowntypes + commit: 44e83bc050a4497fa7b36b34d95ca156 diff --git a/apis/buf.yaml b/apis/buf.yaml new file mode 100644 index 00000000000..af88baa1155 --- /dev/null +++ b/apis/buf.yaml @@ -0,0 +1,10 @@ +version: v1 +name: buf.build/crossplane/crossplane +deps: +- buf.build/protocolbuffers/wellknowntypes:v24.4 +breaking: + use: + - FILE +lint: + use: + - DEFAULT