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 45df4f7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- "*"
jobs:
lint:
name: "Lint"
name: "Lint & Publish Draft/Branch"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
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 45df4f7

Please sign in to comment.