Skip to content

Commit 6e9cfa1

Browse files
authored
Tie buf version to mise config in all workflows (#746)
1 parent 1be4366 commit 6e9cfa1

File tree

4 files changed

+30
-10
lines changed

4 files changed

+30
-10
lines changed

.github/workflows/compile_protos.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ jobs:
5959
with:
6060
experimental: true
6161

62-
- uses: bufbuild/buf-setup-action@a47c93e0b1648d5651a065437926377d060baa99
63-
if: ${{ !env.is-auto-commit }}
64-
with:
65-
github_token: ${{ secrets.GITHUB_TOKEN }}
66-
6762
- name: Compile protos
6863
if: ${{ !env.is-auto-commit }}
6964
run: 'mise run --force clean ::: buf'

.github/workflows/pullrequest.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,17 @@ jobs:
2020
- uses: actions/checkout@v4
2121
with:
2222
ref: ${{ github.event.pull_request.head.sha }}
23-
- uses: bufbuild/buf-setup-action@v1
23+
- uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac
24+
with:
25+
install: false
26+
experimental: true
27+
- name: Extract buf version from mise
28+
id: buf-version
29+
run:
30+
echo "version=$(mise tool buf --active)" >> $GITHUB_OUTPUT
31+
- uses: bufbuild/buf-setup-action@a47c93e0b1648d5651a065437926377d060baa99
32+
with:
33+
version: ${{ steps.buf-version.outputs.version }}
2434
# Run all Lint runs
2535
- uses: bufbuild/buf-lint-action@v1
2636
# Run breaking change detection against the `main` branch

.github/workflows/tag_and_release_protos.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
outputs:
2424
new_tag: ${{ steps.bump.outputs.new_tag }}
2525
steps:
26-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v5
2727
- name: Bump tag
2828
id: bump
2929
uses: anothrNick/[email protected]
@@ -38,13 +38,23 @@ jobs:
3838
runs-on: ubuntu-latest
3939
container: ghcr.io/viamrobotics/canon:amd64
4040
steps:
41-
- uses: actions/checkout@v3
42-
- uses: bufbuild/buf-setup-action@v1
41+
- uses: actions/checkout@v5
42+
- uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac
43+
with:
44+
install: false
45+
experimental: true
46+
- name: Extract buf version from mise
47+
id: buf-version
48+
run:
49+
echo "version=$(mise tool buf --active)" >> $GITHUB_OUTPUT
50+
- uses: bufbuild/buf-setup-action@a47c93e0b1648d5651a065437926377d060baa99
51+
with:
52+
version: ${{ steps.buf-version.outputs.version }}
4353
- uses: AdamMagaluk/buf-push-action@v1
4454
with:
4555
input: proto/viam
4656
buf_token: ${{ secrets.BUF_TOKEN }}
47-
tag: ${{needs.bump-tag.outputs.new_tag}}
57+
tag: ${{ needs.bump-tag.outputs.new_tag }}
4858

4959
dispatch:
5060
needs: [bump-tag, buf-push]

mise.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ lockfile = false
1010
# (Josh) At time of writing the go backend is experimental. When it's promoted
1111
# to stable this can be removed.
1212
experimental = true
13+
# (Josh) asdf plugins are just shell scripts that can impose dependencies on
14+
# arbitrary cli tools and are just generally worse than all the other backend
15+
# options. If we really need to we can reenable asdf but for now it's disabled
16+
# to ensure it is not selected by any future `buf use` invocations.
17+
disable_backends = ["asdf"]
1318

1419
[tools]
1520
buf = "1.55.1"

0 commit comments

Comments
 (0)