ci(workflows): add librarian generation check presubmit - #9039
Open
quirogas wants to merge 8 commits into
Open
Conversation
Contributor
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Modifications to librarian configuration and generator scripts require downstream generated code to be kept in sync with upstream changes. Adds .github/workflows/generation_check.yaml to run on pull requests that modify librarian.yaml, .readme-partials.yaml, librarian.js, or librarian.ts, as well as on main branch pushes and workflow_dispatch events. The workflow sets up Node.js 22, pins googleapis/librarian to an immutable commit SHA (passing zizmor security checks), installs Librarian dependencies, executes librarian generate --all across configured packages, and asserts zero uncommitted git diffs exist. Fixes googleapis/librarian#5352
quirogas
force-pushed
the
feat/ci-librarian-generation-check
branch
from
July 31, 2026 19:47
43cb187 to
dd2ccf9
Compare
Updates googleapis/librarian action SHA pin to 35997441eafc2b02716804f9baba1e3f04f8a44f corresponding to tag v0.31.1, aligning the action version with the version specified in librarian.yaml.
…workflow model Adds .github/workflows/librarian_tidy.yml to verify that librarian.yaml is tidy on pull requests. Updates .github/workflows/generation_check.yaml to match the established google-cloud-go workflow pattern, using googleapis/librarian@main and adding automated main branch failure reporting via create-issue-on-failure.
Pins googleapis/librarian and create-issue-on-failure actions to commit SHA a02c28273b3c9ddb33bbe5849a44b6a678d28404 (v0.31.1) across generation_check.yaml and librarian_tidy.yml. This satisfies Alphabet's mandatory Zizmor security scanning policy requiring immutable commit SHA references for third-party actions, while allowing librarian.yaml to dynamically control CLI binary execution.
…for Zizmor Suppresses excessive-permissions audit finding on job-level issues:write permission in generation_check.yaml. Updates concurrency grouping expressions across generation_check.yaml and librarian_tidy.yml to use pull_request.number to resolve Exit Code 13 findings.
… checks Adds inline explanatory comments to contents: read and issues: write permission entries under jobs.regeneration in generation_check.yaml. This resolves Zizmor's undocumented-permissions audit finding.
Updates version comments for actions/checkout (v4.2.2) and dorny/paths-filter (v3.0.2) across generation_check.yaml and librarian_tidy.yml to resolve Zizmor ref-confusion findings.
…n comments Resolves Zizmor ref-version-mismatch and stale-action-refs warnings by aligning actions/checkout to # v6.0.3, dorny/paths-filter to # v4.0.1, and pinning googleapis/librarian to commit 35997441eafc2b02716804f9baba1e3f04f8a44f corresponding to tag v0.31.1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modifications to librarian configuration and generator scripts require downstream generated code to be kept in sync with upstream changes.
Adds .github/workflows/generation_check.yaml to run on pull requests that modify librarian.yaml, .readme-partials.yaml, librarian.js, or librarian.ts, as well as on main branch pushes and workflow_dispatch events. The workflow sets up Node.js 22, installs Librarian dependencies, executes librarian generate --all across configured packages, and asserts zero uncommitted git diffs exist.
Closes googleapis/librarian#5352