Skip to content

Commit 86d7b69

Browse files
authored
Workaround to keep the old way of using buf (#160)
1 parent cda70be commit 86d7b69

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

go/configure/action.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,18 @@ runs:
3232
BUF_VERSION=$(awk '/^buf[[:space:]]+/ {print $2}' .tool-versions)
3333
echo "BUF_VERSION=${BUF_VERSION}" >> $GITHUB_ENV
3434
shell: bash
35-
- name: Setting up buf
35+
- name: Setting up buf if version is provided
3636
uses: bufbuild/buf-setup-action@v1
37-
if: "${{ inputs.BUF_BUILD_API_TOKEN != '' }}"
37+
if: "${{ inputs.BUF_BUILD_API_TOKEN != '' && env.BUF_VERSION != '' }}"
3838
with:
3939
github_token: ${{ inputs.FLIPPCIRCLECIPULLER_REPO_TOKEN }}
4040
buf_user: ${{ inputs.BUF_BUILD_USER }}
4141
buf_api_token: ${{ inputs.BUF_BUILD_API_TOKEN }}
4242
version: ${{ env.BUF_VERSION }}
43+
- name: Setting up buf if version is not provided
44+
uses: bufbuild/buf-setup-action@v1
45+
if: "${{ inputs.BUF_BUILD_API_TOKEN != '' && env.BUF_VERSION == '' }}"
46+
with:
47+
github_token: ${{ inputs.FLIPPCIRCLECIPULLER_REPO_TOKEN }}
48+
buf_user: ${{ inputs.BUF_BUILD_USER }}
49+
buf_api_token: ${{ inputs.BUF_BUILD_API_TOKEN }}

0 commit comments

Comments
 (0)