fix(ci): sign auto-generated docs commits#5154
Merged
Merged
Conversation
Docs commits were created with a hand-set app bot identity (github-aws-runners-pr|bot) while pushing with GITHUB_TOKEN, so they were unsigned, showed as unverified, and resolved to no GitHub account. Create commits through the GitHub GraphQL API (createCommitOnBranch) instead, which GitHub signs and attributes to github-actions[bot], and enable sign-commits on create-pull-request for the main branch path.
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
npalm
previously approved these changes
Jun 10, 2026
npalm
left a comment
Member
There was a problem hiding this comment.
Looks good, but @guicaulada maybe make a tiny doc change, Some trival change. This will trigger a commit on the branch to proof it fix the probelm
terraform-docs stages updated files with git add, so an unstaged-only diff reports no changes; compare against HEAD instead.
Brend-Smits
approved these changes
Jun 10, 2026
Brend-Smits
requested changes
Jun 10, 2026
Brend-Smits
left a comment
Contributor
There was a problem hiding this comment.
Great work, seems the terraform docs step is failing:
Run # diff against HEAD because terraform-docs stages the files it updates
/home/runner/work/_temp/6c1ec272-b350-4198-9822-211949289d07.sh: line 9: /usr/bin/jq: Argument list too long
gh: A query attribute must be specified and must be a string.
{"errors":[{"message":"A query attribute must be specified and must be a string."}]}
Error: Process completed with exit code 1.
Passing the additions JSON as a jq argument exceeds the kernel's per-argument limit once file contents are embedded; read it from a temp file with --slurpfile instead and log the committed files.
Contributor
Author
|
Well... I tested in a |
Brend-Smits
pushed a commit
that referenced
this pull request
Jun 11, 2026
🤖 I have created a release *beep* *boop* --- ## [7.7.0](v7.6.1...v7.7.0) (2026-06-11) ### Features * Add feature to enable dynamic ec2 config via workflow labels ([#5003](#5003)) ([c68445d](c68445d)) * add support for macos runners ([#4930](#4930)) ([3e179a3](3e179a3)) * Introduce Amazon Linux 2023 ARM image ([#4780](#4780)) ([e572ae5](e572ae5)) * relax cpu_options schema and add amd_sev_snp + nested_virtualization support ([#5039](#5039)) ([5a3746d](5a3746d)) * **runner-role:** Enable using separate IAM role for runners ([#4875](#4875)) ([6642e57](6642e57)) ### Bug Fixes * **ci:** sign auto-generated docs commits ([#5154](#5154)) ([a6af4d2](a6af4d2)) * **runners:** wire job_retry.lambda_memory_size and lambda_timeout ([#5120](#5120)) ([404785e](404785e)) * **scale-up:** Add ec2:TerminateInstances permission to scale-up Lambda IAM policy ([#5152](#5152)) ([94c4e12](94c4e12)) * **scale-up:** prevent negative TotalTargetCapacity when runners exceed maximum ([#5062](#5062)) ([9ab7410](9ab7410)) * **webhook:** Fix publish events to EventBridge ([#5143](#5143)) ([a72b737](a72b737)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: runners-releaser[bot] <194412594+runners-releaser[bot]@users.noreply.github.com>
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.
The
update-docsworkflow creates docs commits with a hand-set bot identity (github-aws-runners-pr|bot) while pushing withGITHUB_TOKEN. The resulting commits are unsigned, show as unverified, and don't resolve to any GitHub account (see dd5f00c on #5152 —verification.reason: unsigned, no linked author).Key changes:
git-push: false); a new step creates the commit through the GraphQLcreateCommitOnBranchmutation instead. Commits created via the API are signed by GitHub and show as Verified, attributed togithub-actions[bot]. This avoids adding a new third-party action dependency.sign-commits: trueonpeter-evans/create-pull-request, which also creates commits via the API for the same effect.Notes:
createCommitOnBranchwithGITHUB_TOKENdoes not trigger new workflow runs, matching the previousgit pushbehavior (no recursion).mkdocs gh-deploycommits togh-pagesremain unsigned; mkdocs commits locally via git, so it can't use the API. Its identity (github-actions[bot]) at least matches the token used.Validated with actionlint and zizmor (no findings on this workflow).
Testing
Tested end-to-end on a throwaway branch (
gc/test/verified-docs-commits) containing this workflow plus a deliberately stale doc (a tweaked variable description inmodules/webhook/variables.tfwithout regenerating the READMEs):No documentation changes to commit.(run 27298488008)Compare with the unverified commit that motivated this PR:
dd5f00chas"verified": false, "reason": "unsigned"and no resolvable author account.Testing also surfaced two fixes now included here: terraform-docs stages the files it updates, so the change detection diffs against
HEAD; and the GraphQL payload is passed tojqvia a temp file (--slurpfile) because embedding file contents in a CLI argument exceeded the kernel's per-argument size limit.