Skip to content

CI: Add label check and signature verification in GitHub Actions#203

Merged
5 commits merged into
developfrom
ci-duranta-fixes
Jul 4, 2026
Merged

CI: Add label check and signature verification in GitHub Actions#203
5 commits merged into
developfrom
ci-duranta-fixes

Conversation

@jfiedlerova

@jfiedlerova jfiedlerova commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

TODO:

  • Update contributing guidelines for signing of commits
  • Check for unsigned commits in the github actions workflow
  • Skip CI when no mandatory CI label present on the PR
  • Always remove retrigger-ci label when present - Like post-always or post-cleanup

Testing PR, on jfiedlerova fork:

  1. commit signature: Test GitHub Actions Workflow  jfiedlerova/openairinterface5g#31 (comment)
image
  1. To always remove the retrigger-ci label: GitHub Actions Run #1, GitHub Actions Run #2, GitHub Actions Run #3: Test GitHub Actions Workflow  jfiedlerova/openairinterface5g#31

  2. In case of missing mandatory labels, https://github.com/jfiedlerova/openairinterface5g/actions/runs/28595375541/job/84789328408

image

When adding again one of the mandatory labels, like documentation, https://github.com/jfiedlerova/openairinterface5g/actions/runs/28596301504/job/84792521919

  1. For Push events: The check-labels and verify-signed-commits are skipped and then rest of the jobs continue as shown here -> https://github.com/jfiedlerova/openairinterface5g/actions/runs/28647207409, https://github.com/jfiedlerova/openairinterface5g/actions/runs/28658340108/job/84993409338

@jfiedlerova
jfiedlerova requested review from arora-sagar and rorsc June 17, 2026 16:00
@jfiedlerova jfiedlerova added the documentation Documentation-related changes or updates. label Jun 17, 2026
@rorsc rorsc mentioned this pull request Jun 18, 2026
Comment thread ci-scripts/Jenkinsfile-GitHub-Container
@rorsc

rorsc commented Jun 18, 2026

Copy link
Copy Markdown
Member

please complete the PR with the outstanding changes. What is here is ok so far, see the one comment.

  - Add check-labels job that runs first on the PR events
  - Fail early if none of the mandatory CI labels are present
    (BUILD-ONLY, documentation, 4G-LTE, 5G-NR, nrUE, CI, retrigger-ci)
  - Skip detect-changes, require-maintainer-approval and trigger-jenkins
    when no mandatory CI label is found
  - Push events are unaffected by the label check
  - For labeled events, only retrigger-ci triggers the pipeline;
    any other label addition is skipped

Co-authored-by: Shubhika Garg <shubhika.garg@openairinterface.org>
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Comment thread CONTRIBUTING.md

@rorsc rorsc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is ok for me if we address the two changes.

Jaroslava did not want to merge it with the normal integration branch, is this still the case?

Comment thread .github/workflows/jenkins-dispatch.yml Outdated
Comment thread CONTRIBUTING.md
sgarg00 and others added 3 commits June 26, 2026 13:56
  - Add verify-signed-commits job that runs on PR
  - check-labels and all downstream jobs are skipped
    if signed commmit verifications fails
  - Fetch all commits in the PR via GitHub API
    and check verification status
  - Fail and print the unsigned commit SHAs if any
    unsigned commits are found.

Co-authored-by: Shubhika Garg <shubhika.garg@openairinterface.org>
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
  - Previously the label was only removed when it was the labeled event
    that triggered the workflow. If a PR was synchronized or reopened
    while the label was already present, it would not be removed by
    the workflow.
  - Created a dedicated cleanup job that depends on all other jobs
    with if: always(), ensuring it runs regardless of whether upstream
    jobs succeeded, failed, or were skipped.
  - Now the cleanup runs on every pull_request_target event and removes
    the label if present, ensuring it is always cleared after CI completes.

Co-authored-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
@sgarg00

sgarg00 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

is ok for me if we address the two changes.

Jaroslava did not want to merge it with the normal integration branch, is this still the case?

When I checked with her last week, she told that this branch would be merged separately as per discussion with you.
But I am not sure if she wants it to be merged alone or this week integration branch is ok for her. I have messaged her..

@rorsc rorsc mentioned this pull request Jun 26, 2026
Comment thread CONTRIBUTING.md
  - The require-maintainer-approval job was being skipped on push event
    when upstream jobs (verify-signed-commits and check-labels) were skipped,
    even though detect-changes job successfully marked protected files as changed.
  - GitHub Actions may skip dependent jobs due to upstream skipped states before
    evaluating custom conditions.
  - Adding always() ensures the job condition is evaluated regardless of
    the status of upstream jobs, while still enforcing the rule that the job
    only runs when protected_files_changed == true.

Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
@rorsc rorsc mentioned this pull request Jul 3, 2026
rorsc added a commit that referenced this pull request Jul 3, 2026
…on_2026_w27

CI: Add label check and signature verification in GitHub Actions (#203)

- Update contributing guidelines for signing of commits
- Check for unsigned commits in the github actions workflow
- Skip CI when no mandatory CI label present on the PR
- Always remove retrigger-ci label when present - Like post-always or
  post-cleanup

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Sagar Arora <sagar.arora@openairinterface.org>
Reviewed-by: Shubhika Garg <shubhika.garg@openairinterface.org>
@rorsc rorsc closed this pull request by merging all changes into develop in 0dab3bb Jul 4, 2026
@rorsc
rorsc deleted the ci-duranta-fixes branch July 4, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation-related changes or updates.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants