nuttx/.github/workflows
Lup Yuen Lee 4e9ab20b6a github/workflow: Reimplement PR Labeling without pull_request_target
ASF Infrastructure Team has flagged a GitHub Actions workflow policy violation, inside our PR Labeling. We must remove pull_request_target before 6 Apr 2026, or ASF Infra will turn off all GitHub Builds: https://github.com/apache/nuttx/issues/18359

This PR reimplements the PR Labeling with two triggers: pull_request and workflow_run. We no longer need pull_request_target, which is an unsafe trigger and may introduce security vulnerabilities.

GitHub Actions `codelytv/pr-size-labeler` and `actions/labeler` don't work with the pull_request trigger, so we replaced them with our own code. The implementation is explained here: https://github.com/apache/nuttx/issues/18359

### Modified Files

`.github/workflows/labeler.yml`: Changed the (read-write) pull_request_target trigger to (read-only) pull_request trigger. Compute the Size Label (e.g. Size: XS) and Arch Labels (e.g. Arch: arm). Save the PR Labels into a PR Artifact.

`.github/labeler.yml`: Added comment to clarify that NuttX PR Labeler only supports a subset of the `actions/labeler` syntax: `changed-files` and `any-glob-to-any-file`

### New Files

`.github/workflows/pr_labeler.yml`: Contains the workflow_run trigger, which is executed upon completion of the pull_request trigger. Download the PR Labels from the PR Artifact. Write the PR Labels into the PR.

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2026-02-17 09:53:41 +01:00
..
arch.yml CI: Increase CI Jobs to 100% for Complex PRs 2025-01-08 15:05:18 +08:00
build.yml tools: fix make host_info flag parsing and config string escaping 2026-02-05 14:23:19 +01:00
check.yml build(deps): bump actions/checkout from 5 to 6 2025-11-25 10:36:55 +01:00
doc.yml docs/plantuml: Add PlantUML support to Documentation build 2026-02-15 08:47:23 +01:00
docker_linux.yml build(deps): bump actions/checkout from 5 to 6 2025-11-25 10:36:55 +01:00
issue_labeler.yml build(deps): bump actions/github-script from 7 to 8 2025-09-08 21:48:03 +08:00
labeler.yml github/workflow: Reimplement PR Labeling without pull_request_target 2026-02-17 09:53:41 +01:00
lint.yml build(deps): bump actions/checkout from 5 to 6 2025-11-25 10:36:55 +01:00
pr_labeler.yml github/workflow: Reimplement PR Labeling without pull_request_target 2026-02-17 09:53:41 +01:00