Repository navigation
chore(ci): pin all GitHub Action refs to commit SHAs (API-475) - #6819
Merged
Merged
Conversation
Contributor
No code generatedIf you believe code should've been generated, please, report the issue. π Benchmark resultsBenchmarks performed on the method using a mock server, the results might not reflect the real-world performance.
|
This was referenced Aug 3, 2026
MarioAlexandruDan
marked this pull request as ready for review
August 4, 2026 08:01
The generator copies templates/issue.yml and templates/do-not-edit-this-repository.yml into every client's .github/workflows/ on each generation run, so leaving them unpinned would revert the pinned client copies at the next codegen pass.
Without this, a digest bump on a client workflow copy would be reverted by the next codegen pass because the source template kept the old SHA, and Renovate would reopen the same update.
eric-zaharia
approved these changes
Aug 4, 2026
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.
π§ What and Why
π JIRA Ticket: API-475
Floating action tags like
actions/checkout@v7are mutable: whoever controls the action repository can move the tag and every CI run silently picks up the new code. This PR pins everyuses:reference to a full commit SHA, with the concrete release version kept as a trailing comment so Renovate can keep the pins updated.While auditing, we found that the client workflows under
clients/*/.github/workflows/(which are spread verbatim to the public client repos, where the publish credentials live) had the same problem, so they are pinned here too. That extends the original scope of the ticket, which only counted the 8 automation workflows and the setup composite action.Two follow-up PRs build on this one:
redsun82/setup-swiftfork (kept as is here, see below) with the upstreamswift-actions/setup-swift, which is now fixed, pinnable and Renovate managed.Changes included:
.github/workflows/and in.github/actions/setup/action.yml. Example:.github/workflows/pr-title.ymlline 12 now readsactions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1.clients/*/.github/workflows/(release.yml, issue.yml, do-not-edit-this-repository.yml for each language). This includes the reusable workflow calldart-lang/setup-dart/.github/workflows/publish.yml@v1in the Dart release workflow, and the release actions holding publish credentials (pypa/gh-action-pypi-publish,NuGet/login).templates/issue.ymlandtemplates/do-not-edit-this-repository.yml. The generator copies these two files into every client's.github/workflows/at generation time (generators/src/main/java/com/algolia/codegen/utils/Helpers.javaline 338), so leaving them unpinned would have reverted the pinned client copies on the next codegen pass.rubygems/release-gemSHA so Renovate can manage it (clients/algoliasearch-client-ruby/.github/workflows/release.ymlline 27, resolves to v1.1.4).helpers:pinGitHubActionDigeststo the extends list inrenovate.json(line 7) so Renovate keeps the pinned SHAs updated. Neitherconfig:js-appnor our sharedrenovate-config-algoliapreset enables digest pinning today.github-actionsmanager file patterns inrenovate.json(line 285) with/\.github/actions/.*/action\.ya?ml$/and/^templates/.*\.ya?ml$/. The previous override only matched workflow files, which silently excluded the setup composite action from Renovate updates. The templates pattern is needed because a digest bump on a client workflow copy would otherwise be reverted by the next codegen pass from the stale template, and Renovate would reopen the same update indefinitely.Deliberately unchanged:
actions/create-github-app-tokenwas already pinned with a version comment (6 places).redsun82/setup-swift@b2b6f77...is a fork pin with no release tags, kept as is (see the commented outswift-actions/setup-swiftline above it in.github/actions/setup/action.yml). fix(ci): switch back to upstream swift-actions/setup-swiftΒ #6822 moves it back to the upstream action../.github/actions/setup,./scripts/ci/actions/restore-artifacts) do not need pinning.Every floating tag was resolved to the exact commit it points to today, so runtime behavior is identical. Full mapping:
Note:
ruby/setup-ruby@v1,marocchino/sticky-pull-request-comment@v3andpypa/gh-action-pypi-publish@release/v1were floating branches, not tags. Their pinned SHAs are the branch heads, which match the release tags shown in the table.π§ͺ Test
actionlintpasses on all touched workflows. The only findings are pre-existing shellcheck notes inrun:scripts that this PR does not touch.zizmorreports zero unpinned-uses findings across.github/andclients/*/.github/workflows/after this change.renovate.jsonvalidated withpython3 -m json.tool.actions/checkout@3d3c42e...is the "prep v7.0.1 release (chore(deps): update dependency lerna to v8.0.2Β #2531)" commit, and theruby/setup-rubySHA exists in that repo.git ls-remote(annotated tags dereferenced via^{}), so each pin is the exact commit the old floating ref resolved to at the time of this PR, meaning no behavior change.