Skip to content

CI: Migrate release-drafter to v7 split#57

Merged
tykeal merged 1 commit intolfreleng-actions:mainfrom
modeseven-lfreleng-actions:fix/release-drafter-v7-split
Mar 19, 2026
Merged

CI: Migrate release-drafter to v7 split#57
tykeal merged 1 commit intolfreleng-actions:mainfrom
modeseven-lfreleng-actions:fix/release-drafter-v7-split

Conversation

@ModeSevenIndustrialSolutions
Copy link
Copy Markdown
Contributor

Summary

Migrates release-drafter from v6 (combined workflow) to v7 (split architecture).

Release-drafter v7 removed the disable-releaser and disable-autolabeler inputs, replacing them with dedicated sub-actions. These inputs were left as dead code in action.yml — accepted without warning but never acted upon (upstream bug report).

Changes

  • Splits the combined release-drafter.yaml workflow into two:
    • release-drafter.yaml — push-only trigger, uses root drafter action, contents: write
    • autolabeler.yaml — PR trigger (both pull_request and pull_request_target for fork support), uses dedicated /autolabeler sub-action, pull-requests: write + contents: read
  • Updates to release-drafter v7.1.0 and harden-runner v2.16.0
  • Removes the per-repo .github/release-drafter.yml config (falls back to the org-level .github repo config)
  • Removes deprecated env: GITHUB_TOKEN usage (v7 defaults to ${{ github.token }} via token input)
  • Removes debug concurrency group step (no longer needed with clean workflow split)

Context

This is part of an org-wide migration. The same change is being applied to all lfreleng-actions repositories that have release-drafter configured. The canonical fix was first applied in lfreleng-actions/github2gerrit-action#172.

Security

The pull_request_target trigger in the autolabeler workflow is safe because:

  1. The workflow does NOT checkout any code from the PR
  2. The workflow code runs from the base branch (not the fork)
  3. release-drafter only makes GitHub API calls (no code execution)
  4. Fork detection logic prevents duplicate runs for same-repo PRs

Copilot AI review requested due to automatic review settings March 19, 2026 13:49
@github-actions github-actions bot added the CI CI and tests updates label Mar 19, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the repository’s Release Drafter automation from the v6 “combined” workflow to the v7 split architecture by separating release drafting (push-only) from PR autolabeling (PR events, including fork-safe pull_request_target).

Changes:

  • Split the existing Release Drafter workflow into two workflows: push-only release drafting and PR-triggered autolabeling.
  • Bumped actions to release-drafter@v7.1.0 and added step-security/harden-runner@v2.16.0 to both workflows.
  • Removed the repository-local .github/release-drafter.yml configuration file.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/release-drafter.yaml Migrates to release-drafter@v7, removes PR triggers, adds hardening/concurrency, and restricts permissions.
.github/workflows/autolabeler.yaml Adds a dedicated autolabeler workflow (fork-safe via pull_request_target) with minimal permissions and runner hardening.
.github/release-drafter.yml Removes repo-local Release Drafter configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Release-drafter v7 removed the disable-releaser
and disable-autolabeler inputs, replacing them
with dedicated sub-actions. This commit:

- Splits the combined workflow into two files:
  release-drafter.yaml (push-only, drafter)
  and autolabeler.yaml (PR events, autolabeler)
- Updates to release-drafter v7.1.0
- Updates harden-runner to v2.16.0
- Removes the per-repo release-drafter config
  (falls back to org-level .github repo config)
- Removes deprecated env GITHUB_TOKEN usage
- Removes debug concurrency group step

Co-authored-by: Claude <claude@anthropic.com>
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
Copy link
Copy Markdown
Contributor

@tykeal tykeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved by dependamerge

@tykeal tykeal merged commit 3674a8b into lfreleng-actions:main Mar 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI CI and tests updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants