File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -32,11 +32,18 @@ runs:
32
32
BUF_VERSION=$(awk '/^buf[[:space:]]+/ {print $2}' .tool-versions)
33
33
echo "BUF_VERSION=${BUF_VERSION}" >> $GITHUB_ENV
34
34
shell : bash
35
- - name : Setting up buf
35
+ - name : Setting up buf if version is provided
36
36
uses : bufbuild/buf-setup-action@v1
37
- if : " ${{ inputs.BUF_BUILD_API_TOKEN != '' }}"
37
+ if : " ${{ inputs.BUF_BUILD_API_TOKEN != '' && env.BUF_VERSION != '' }}"
38
38
with :
39
39
github_token : ${{ inputs.FLIPPCIRCLECIPULLER_REPO_TOKEN }}
40
40
buf_user : ${{ inputs.BUF_BUILD_USER }}
41
41
buf_api_token : ${{ inputs.BUF_BUILD_API_TOKEN }}
42
42
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 }}
You can’t perform that action at this time.
0 commit comments