diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index f510454..03d728b 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -10,7 +10,7 @@ on: - "*" jobs: lint: - name: "Lint" + name: "Lint & Publish Draft/Branch" runs-on: "ubuntu-latest" steps: - uses: "actions/checkout@v3" @@ -33,3 +33,15 @@ jobs: env: BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}" run: "buf push --draft ${{ github.sha }}" + - name: "Push to BSR a Draft" + if: "github.event_name == 'push' && github.ref == 'refs/heads/main'" + shell: "bash" + env: + BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}" + run: "buf push --draft ${{ github.sha }}" + - name: "Push to BSR a Branch" + if: "github.event_name == 'push' && github.ref != 'refs/heads/main'" + shell: "bash" + env: + BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}" + run: "buf push --branch ${{ github.sha }}"