Skip to content

Improvements to build/publish workflow - #416

Open
samsrabin wants to merge 20 commits into
NCAR:mainfrom
samsrabin:more-workflow-improvements
Open

samsrabin wants to merge 20 commits into
NCAR:mainfrom
samsrabin:more-workflow-improvements

Conversation

@samsrabin

@samsrabin samsrabin commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Bringing in some improvements from the CLM tutorial repo:

  • On PR test failure, now posts a comment with the failure logs. (E.g.)
  • Now extra picky about build cleanliness (--nitpick).

samsrabin and others added 20 commits November 2, 2026 12:40
The comment workflow has pull-requests: write but was reading the PR number from an artifact written by the pull_request run, which a fork PR fully controls. A fork could forge the number and have the bot post on any PR in the repo. Now the PR is found by matching the triggering run's head SHA, which GitHub sets, against open PRs. The log body is still attacker-controlled, but at least it can only land on the PR that produced it.

Allows dropping the pr_number.txt step from the builder.

Since workflow_run only executes the default-branch copy of the comment workflow, putting the verification in that workflow secures it against PRs that try to change it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Now will not fail (potentially silently) because of drift in definition of DOCS_FAILURE_ARTIFACT between the two workflows.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@samsrabin
samsrabin marked this pull request as draft November 2, 2026 19:49
@samsrabin
samsrabin force-pushed the more-workflow-improvements branch from ca353d2 to 6025d62 Compare November 2, 2026 19:56
@samsrabin
samsrabin marked this pull request as ready for review November 2, 2026 19:57
@samsrabin

Copy link
Copy Markdown
Member Author

@nusbaume This is ready for integration! I just cherry-picked stuff from the CTSM repo, so it should all work.

@nusbaume
nusbaume self-requested a review November 5, 2026 20:21

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant