[DOCS-15378] Add scheduled blog linker workflow - #39359
Merged
Merged
Conversation
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 does this PR do? What is the motivation?
Fixes DOCS-15378
Adds a scheduled workflow that runs the blog linker script every Tuesday and opens a draft PR on a branch with the result, plus the dd-octo-sts trust policy it needs.
The blog linker script adds Datadog blog post links to the
further_readingsection of the docs pages those posts reference. It has been run manually on a regular basis; this action automates the run itself. The output opens a draft PR on a branch for manual review prior to the standard docs PR review process.Two files:
.github/workflows/blog_linker.yml— the weekly job run via cron.github/chainguard/documentation.blog-linker-write.sts.yaml— the trust policy that lets it push a branch and open the PRThe script lives in
DataDog/websites-images(services/webops-site-build/bin/docs-ci/blog_linker.py) and is fetched at run time, per the convention that build scripts live in the image rather than the docs repo. The companion PR adding the matching read policy there is DataDog/websites-images#479.About the write permission
The policy grants
contents: writeandpull_requests: write, which the job needs to push its branch and open the PR.It is pinned as narrowly as the claims allow:
refs/heads/masterscheduleorworkflow_dispatcheventsblog_linker.yml@refs/heads/masterA PR that adds a workflow, or any run from a feature branch, matches nothing and gets no token. Tokens are short-lived and expire with the job.
Written to follow the SECENG guidance in High-level recommendations for ID token verification:
subject,ref,ref_type,event_name, andjob_workflow_refall specified--
ref_protectedis deliberately omitted, since it is true on all branches org-wide and no longer narrows anythingid-token: writeis scoped to the single jobTesting
After both PRs merge, I'll run a manual
workflow_dispatchwithdry_run: true, which reports what it would change without opening a PR. The workflow can't run from a branch.Merge readiness
For Datadog employees:
<name>/<description>convention and include the forward slash (/). If you've already created your PR with an incorrect branch name, please rename your branch and open a fresh PR./reviewto run an automated check that catches common issues before a Documentation team member reviews your PR.AI assistance
Lots of Claude and Codex for writing and testing, with guidance and final review from me.
Additional notes
Nothing lands under
hugo/, so there is no site build impact.