diff --git a/.github/workflows/proto-registry.yml b/.github/workflows/proto-registry.yml new file mode 100644 index 000000000..79cf58e65 --- /dev/null +++ b/.github/workflows/proto-registry.yml @@ -0,0 +1,21 @@ +name: Buf-Push +# Protobuf runs buf (https://buf.build/) push updated proto files to https://buf.build/cosmos/cosmos-sdk +# This workflow is only run when a .proto file has been changed +on: + push: + branches: + - master + paths: + - 'proto/**' + +jobs: + push: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: bufbuild/buf-setup-action@v0.6.0 + - uses: bufbuild/buf-push-action@v1 + with: + input: 'proto' + buf_token: ${{ secrets.BUF_TOKEN }} + diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index 1ddbf0097..105c3fb90 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -3,28 +3,31 @@ name: Protobuf # This workflow is only run when a .proto file has been changed on: pull_request: + paths: + - 'proto/**' + push: + branches: + - master + paths: + - 'proto/**' jobs: lint: runs-on: ubuntu-latest timeout-minutes: 5 steps: - - uses: actions/checkout@master - - uses: technote-space/get-diff-action@v6.0.1 - with: - PATTERNS: | - **/**.proto - - name: lint - run: make proto-lint - if: env.GIT_DIFF - breakage: + - uses: actions/checkout@v2 + - uses: bufbuild/buf-setup-action@v0.6.0 + - uses: bufbuild/buf-lint-action@v1 + with: + input: 'proto' + + break-check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - uses: technote-space/get-diff-action@v6.0.1 + - uses: actions/checkout@v2 + - uses: bufbuild/buf-setup-action@v0.6.0 + - uses: bufbuild/buf-breaking-action@v1 with: - PATTERNS: | - **/**.proto - - name: check-breakage - run: make proto-check-breaking - if: env.GIT_DIFF + input: 'proto' + against: 'https://github.com/${{ github.repository }}.git#branch=${{ github.event.pull_request.base.ref }},ref=HEAD~1,subdir=proto'