Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .github/workflows/librarian_generation_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,9 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: 'stable'
- name: Install Librarian
run: |
V=$(go run github.com/googleapis/librarian/cmd/librarian@latest config get version)
echo "Installing librarian version $V"
go install github.com/googleapis/librarian/cmd/librarian@$V
# Version of librarian is pulled from librarian.yaml,
# action is pinned to commit SHA to satisfy blanket security policy.
- uses: googleapis/librarian@c54791693e09a76a7403f3dc81c7c97782908b3d # v0.53.0
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
with:
java-version: "17"
Expand Down Expand Up @@ -101,7 +96,7 @@ jobs:
fi
- name: Create issue if previous step fails
if: ${{ failure() && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: googleapis/librarian/.github/actions/create-issue-on-failure@35997441eafc2b02716804f9baba1e3f04f8a44f # v0.31.1
uses: googleapis/librarian/.github/actions/create-issue-on-failure@c54791693e09a76a7403f3dc81c7c97782908b3d # v0.53.0
with:
title: "Librarian generate diff check failed on main branch"
body: |
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/showcase-version-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,14 @@ jobs:
run: |
version=$(awk -F'[<>]' '/gapic-showcase.version/{print $3; exit}' java-showcase/gapic-showcase/pom.xml)
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: '1.24'
# Version of librarian is pulled from librarian.yaml,
# action is pinned to commit SHA to satisfy blanket security policy.
- uses: googleapis/librarian@c54791693e09a76a7403f3dc81c7c97782908b3d # v0.53.0
- name: Extract showcase commit from librarian.yaml
id: extract_commit
shell: bash
run: |
version=$(go run github.com/googleapis/librarian/cmd/librarian@latest config get version)
commit=$(go run "github.com/googleapis/librarian/cmd/librarian@${version}" config get sources.showcase.commit)
commit=$(librarian config get sources.showcase.commit)
echo "commit=$commit" >> "$GITHUB_OUTPUT"
- name: Verify showcase version and commit match
shell: bash
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/showcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,11 @@ jobs:
env:
BUILD_SUBDIR: sdk-platform-java
JOB_TYPE: install
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: 'stable'
- name: Install Librarian and tools
run: |
V=$(go run github.com/googleapis/librarian/cmd/librarian@latest config get version)
echo "Installing librarian version $V"
go install github.com/googleapis/librarian/cmd/librarian@$V
librarian install
# Version of librarian is pulled from librarian.yaml,
# action is pinned to commit SHA to satisfy blanket security policy.
- uses: googleapis/librarian@c54791693e09a76a7403f3dc81c7c97782908b3d # v0.53.0
- name: Install Librarian tools
run: librarian install
- name: Setup Java 17 for Golden Tests
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
with:
Expand Down
35 changes: 8 additions & 27 deletions .github/workflows/update_librarian_googleapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,11 @@ on:
jobs:
update-librarian-googleapis:
runs-on: ubuntu-24.04
defaults:
run:
working-directory: google-cloud-java
steps:
- name: Checkout google-cloud-java
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
repository: googleapis/google-cloud-java
path: google-cloud-java
fetch-depth: 0
persist-credentials: false
- name: Close Existing PR and Branch
Expand Down Expand Up @@ -67,29 +63,19 @@ jobs:
}
fi
fi
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: '>=1.20.2'
- name: Get librarian version
id: librarian
run: |
version=$(go run github.com/googleapis/librarian/cmd/librarian@latest config get version)
echo "version=${version}" >> $GITHUB_OUTPUT
# Version of librarian is pulled from librarian.yaml,
# action is pinned to commit SHA to satisfy blanket security policy.
- uses: googleapis/librarian@c54791693e09a76a7403f3dc81c7c97782908b3d # v0.53.0
- name: Run librarian update & tidy
run: |
go run "github.com/googleapis/librarian/cmd/librarian@${STEPS_LIBRARIAN_OUTPUTS_VERSION}" update sources.googleapis
go run "github.com/googleapis/librarian/cmd/librarian@${STEPS_LIBRARIAN_OUTPUTS_VERSION}" tidy
env:
STEPS_LIBRARIAN_OUTPUTS_VERSION: ${{ steps.librarian.outputs.version }}
librarian update sources.googleapis
librarian tidy
- name: Get latest commit
id: commit
run: |
new_commit=$(go run "github.com/googleapis/librarian/cmd/librarian@${STEPS_LIBRARIAN_OUTPUTS_VERSION}" config get sources.googleapis.commit)
new_commit=$(librarian config get sources.googleapis.commit)
echo "new_commit=${new_commit}" >> $GITHUB_OUTPUT
echo "short_commit=${new_commit:0:7}" >> $GITHUB_OUTPUT
env:
STEPS_LIBRARIAN_OUTPUTS_VERSION: ${{ steps.librarian.outputs.version }}

- name: Detect Changes To Librarian.yaml
id: detect_librarian
Expand Down Expand Up @@ -119,16 +105,11 @@ jobs:
- name: Run librarian install
if: steps.detect_librarian.outputs.has_changes == 'true'
run: |
go run "github.com/googleapis/librarian/cmd/librarian@${STEPS_LIBRARIAN_OUTPUTS_VERSION}" install
librarian install
echo "$HOME/.cache/librarian/bin/java_tools/bin" >> $GITHUB_PATH
env:
STEPS_LIBRARIAN_OUTPUTS_VERSION: ${{ steps.librarian.outputs.version }}
- name: Generate Libraries
if: steps.detect_librarian.outputs.has_changes == 'true'
run: |
go run "github.com/googleapis/librarian/cmd/librarian@${STEPS_LIBRARIAN_OUTPUTS_VERSION}" generate --all
env:
STEPS_LIBRARIAN_OUTPUTS_VERSION: ${{ steps.librarian.outputs.version }}
run: librarian generate --all
- name: Commit and Create PR
if: steps.detect_librarian.outputs.has_changes == 'true'
env:
Expand Down
Loading