Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion .github/workflows/kernel-build-and-test-multiarch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
description: "Workflow run ID to fetch artifacts from"
required: true
type: string
no_pr:
description: "Skip PR creation/update at the end of the run (for testing only)"
required: false
type: boolean
default: false

permissions:
contents: read
Expand Down Expand Up @@ -368,6 +373,17 @@ jobs:
output/last_build_image.txt
retention-days: 7

# Upload kselftests binaries tarball (the /var/kselftests install tree) for
# downstream testing on hosts that match the kernel release + arch.
- name: Upload kselftests binaries tarball
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: ${{ always() && needs.pre-setup.outputs.skip_kselftests == 'false' }}
with:
name: kselftests-binaries-${{ matrix.arch }}
path: output/kselftests-*.tar.xz
retention-days: 7
if-no-files-found: warn

# Upload LTP qcow2 image
- name: Upload LTP qcow2 image
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand All @@ -380,6 +396,17 @@ jobs:
output/last_build_image.txt
retention-days: 7

# Upload LTP binaries tarball (the /opt/ltp install tree) for downstream
# testing on any arch-matching host.
- name: Upload LTP binaries tarball
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: ${{ always() && needs.pre-setup.outputs.skip_ltp == 'false' }}
with:
name: ltp-binaries-${{ matrix.arch }}
path: output/ltp-*.tar.xz
retention-days: 7
if-no-files-found: warn

# Upload plain boot qcow2 image (only when both kselftests and LTP are skipped)
- name: Upload plain boot qcow2 image
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand Down Expand Up @@ -1175,10 +1202,14 @@ jobs:
name: Create Pull Request
runs-on: kernel-build
needs: [pre-setup, setup, build, boot, test-kselftest, compare-kselftest, test-ltp, compare-ltp]
# The (workflow_dispatch || !no_pr) clause lets manual reruns opt out of
# PR creation by passing -f no_pr=true. workflow_run events (normal CI)
# are unaffected since inputs.no_pr is not set there.
if: |
always() &&
needs.build.result == 'success' &&
needs.boot.result == 'success'
needs.boot.result == 'success' &&
(github.event_name != 'workflow_dispatch' || !inputs.no_pr)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@kemotaha in general PR looks good but this comment from Copilot seems like worth looking at.
We can use something like inputs.no_pr != true

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in 52b4808: switched from !inputs.no_pr to inputs.no_pr != true per the suggestion below, which is robust against the boolean/string coercion behavior you flagged.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done in 52b4808 — using inputs.no_pr != true as you suggested.


steps:
- name: Check if branch name matches a supported pattern
Expand Down