Skip to content

Commit db4a5c7

Browse files
committed
push branches once validated
1 parent 7a8b818 commit db4a5c7

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/lint.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ on:
1010
- "*"
1111
jobs:
1212
lint:
13-
name: "Lint"
13+
name: "Lint & Publish Draft/Branch"
1414
runs-on: "ubuntu-latest"
1515
steps:
1616
- uses: "actions/checkout@v3"
1717
- uses: "authzed/actions/yaml-lint@main"
18-
- uses: "bufbuild/buf-setup-action@v1"
18+
- uses: "bufbuild/buf-setup-action@v1.30.0"
1919
with:
20-
version: "1.22.0"
20+
version: "1.30.0"
2121
- uses: "bufbuild/buf-lint-action@v1"
2222
- uses: "bufbuild/buf-breaking-action@v1"
2323
if: "github.event_name == 'pull_request'"
@@ -33,3 +33,15 @@ jobs:
3333
env:
3434
BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}"
3535
run: "buf push --draft ${{ github.sha }}"
36+
- name: "Push to BSR a Draft"
37+
if: "github.event_name == 'push' && github.ref == 'refs/heads/main'"
38+
shell: "bash"
39+
env:
40+
BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}"
41+
run: "buf push --draft ${{ github.sha }}"
42+
- name: "Push to BSR a Branch"
43+
if: "github.event_name == 'push' && github.ref != 'refs/heads/main'"
44+
shell: "bash"
45+
env:
46+
BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}"
47+
run: "buf push --branch ${{ github.sha }}"

0 commit comments

Comments
 (0)