@@ -57,15 +57,18 @@ jobs:
5757 uses : actions/setup-go@v5
5858 with :
5959 go-version : ' >=1.20.2'
60- - name : Run librarian update
60+ - name : Get librarian version
61+ id : librarian
6162 run : |
6263 version=$(go run github.com/googleapis/librarian/cmd/librarian@latest config get version)
63- go run "github.com/googleapis/librarian/cmd/librarian@${version}" update sources.googleapis
64+ echo "version=${version}" >> $GITHUB_OUTPUT
65+ - name : Run librarian update
66+ run : |
67+ go run "github.com/googleapis/librarian/cmd/librarian@${{ steps.librarian.outputs.version }}" update sources.googleapis
6468 - name : Get latest commit
6569 id : commit
6670 run : |
67- version=$(go run github.com/googleapis/librarian/cmd/librarian@latest config get version)
68- new_commit=$(go run "github.com/googleapis/librarian/cmd/librarian@${version}" config get sources.googleapis.commit)
71+ new_commit=$(go run "github.com/googleapis/librarian/cmd/librarian@${{ steps.librarian.outputs.version }}" config get sources.googleapis.commit)
6972 echo "new_commit=${new_commit}" >> $GITHUB_OUTPUT
7073 echo "short_commit=${new_commit:0:7}" >> $GITHUB_OUTPUT
7174 # TODO(https://github.com/googleapis/librarian/issues/6220): Remove this step.
@@ -115,14 +118,14 @@ jobs:
115118 - name : Run librarian install
116119 if : steps.detect_librarian.outputs.has_changes == 'true'
117120 run : |
118- go run github.com/googleapis/librarian/cmd/librarian@latest install
121+ go run " github.com/googleapis/librarian/cmd/librarian@${{ steps.librarian.outputs.version }}" install
119122 echo "$HOME/.cache/librarian/bin/java_tools/bin" >> $GITHUB_PATH
120123 env :
121124 PYTHONPATH : ${{ github.workspace }}/sdk-platform-java/hermetic_build/library_generation/owlbot
122125 - name : Generate Libraries
123126 if : steps.detect_librarian.outputs.has_changes == 'true'
124127 run : |
125- go run github.com/googleapis/librarian/cmd/librarian@latest generate --all
128+ go run " github.com/googleapis/librarian/cmd/librarian@${{ steps.librarian.outputs.version }}" generate --all
126129 - name : Commit and Create PR
127130 if : steps.detect_librarian.outputs.has_changes == 'true'
128131 env :
0 commit comments