Skip to content

Commit

Permalink
push branches once validated
Browse files Browse the repository at this point in the history
  • Loading branch information
vroldanbet committed Mar 25, 2024
1 parent 7a8b818 commit db4a5c7
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/lint.yaml
Expand Up @@ -10,14 +10,14 @@ on:
- "*"
jobs:
lint:
name: "Lint"
name: "Lint & Publish Draft/Branch"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "authzed/actions/yaml-lint@main"
- uses: "bufbuild/buf-setup-action@v1"
- uses: "bufbuild/buf-setup-action@v1.30.0"
with:
version: "1.22.0"
version: "1.30.0"
- uses: "bufbuild/buf-lint-action@v1"
- uses: "bufbuild/buf-breaking-action@v1"
if: "github.event_name == 'pull_request'"
Expand All @@ -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 }}"

0 comments on commit db4a5c7

Please sign in to comment.