Disable PR workflow for JP branches#226
Disable PR workflow for JP branches#226rucoder wants to merge 1 commit intolf-edge:eve-kernel-amd64-v6.12.49-genericfrom
Conversation
pull_request_target workflow is taken from a default branch however it must not be run for eve-kernel-arm64-v5.15.136-nvidia-jp6 and eve-kernel-arm64-v5.10.192-nvidia-jp5. So disable it for these brtanches Signed-off-by: Mikhail Malyshev <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - "!eve-kernel-arm64-v5.15.136-nvidia-jp6" | ||
| - "!eve-kernel-arm64-v5.10.192-nvidia-jp5" |
There was a problem hiding this comment.
The negation pattern syntax used here will not work as intended in GitHub Actions. When using branches filter in pull_request_target, you cannot use negation patterns (with ! prefix) to exclude specific branches from a wildcard pattern.
The correct approach is to use branches-ignore alongside branches, or to specify explicit branch patterns. Consider one of these alternatives:
- Use a combination of
branchesandbranches-ignore(note they cannot be used together, so you'd need to rethink the filter strategy) - List all desired branches explicitly without wildcards
- Use an
ifcondition in the job level to check and skip the JP branches
For example, you could add a condition at the job level:
jobs:
build:
if: |
!startsWith(github.event.pull_request.base.ref, 'eve-kernel-arm64-v5.15.136-nvidia-jp6') &&
!startsWith(github.event.pull_request.base.ref, 'eve-kernel-arm64-v5.10.192-nvidia-jp5')There was a problem hiding this comment.
@rene oh, GHA are SO limited... I have no good words...
| @@ -5,6 +5,8 @@ on: # yamllint disable-line rule:truthy | |||
| branches: | |||
| - "gha-test-rebase" | |||
| - "eve-kernel-*" | |||
There was a problem hiding this comment.
@rucoder , what about if we just set here eve-kernel-amd64-* instead of eve-kernel-* ?
pull_request_target workflow is taken from a default branch however it must not be run for
eve-kernel-arm64-v5.15.136-nvidia-jp6eve-kernel-arm64-v5.10.192-nvidia-jp5