Skip to content

Conditional actions - #14232

Merged
mxpv merged 3 commits into
containerd:mainfrom
samuelkarp:conditional-actions
Sep 26, 2026
Merged

mxpv merged 3 commits into
containerd:mainfrom
samuelkarp:conditional-actions

Conversation

@samuelkarp

Copy link
Copy Markdown
Member

Private forks of containerd are used for validating security patches ahead of public disclosure. Some of what we run in CI shouldn't really run in that context. We've been working around it with a set of cherrypicks to remove those before, but it'd be simpler (for me 😄) to have this upstream.

Private forks of containerd are used for validating security patches
ahead of public disclosure. Some jobs should not run in that context.

Guard pull_request and push jobs with !github.event.repository.private
so they continue to run on containerd/containerd and public forks.
Because schedule events do not populate github.event.repository, guard
scheduled runs in nightly.yml and scorecards.yml with
github.repository == 'containerd/containerd'.

Assisted-by: Antigravity
Signed-off-by: Samuel Karp <[email protected]>
Skip the linters steps when running in private repositories while
allowing the job itself to succeed so downstream jobs with
`needs: [..., linters, ...]` still run. Exclude macos-latest and
windows-latest from the linters matrix on private repositories to
avoid starting unnecessary runners.

Assisted-by: Antigravity
Signed-off-by: Samuel Karp <[email protected]>
Commit 1921680 removed the separate integration/client Go module
and merged its dependencies into the root module and vendor directory.
Running `go mod download` before `go test` in integration/client is
unnecessary because `go test` uses the root vendor directory.

Assisted-by: Antigravity
Signed-off-by: Samuel Karp <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Adds repository-visibility conditions to CI and release workflows for private forks, and removes a redundant integration dependency download.

Changes:

  • Restricts public-only workflows and selected CI jobs for private repositories.
  • Removes the explicit integration go mod download step.
File Description
Makefile Removes explicit integration module download.
.github/​workflows/​scorecards.yml Restricts Scorecards analysis.
.github/​workflows/​release.yml Skips private-repository releases.
.github/​workflows/​nightly.yml Limits nightly jobs for private repositories.
.github/​workflows/​ci.yml Adjusts private-repository linting.
.github/​workflows/​buf-breaking.yml Skips protobuf checks for private repositories.
.github/​workflows/​api-release.yml Skips private-repository API releases.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mxpv
mxpv added this pull request to the merge queue Sep 25, 2026
Merged via the queue into containerd:main with commit 934434d Sep 26, 2026
57 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Sep 26, 2026
@samuelkarp

Copy link
Copy Markdown
Member Author

/cherry-pick release/2.4
/cherry-pick release/2.3
/cherry-pick release/2.2

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@samuelkarp: #14232 failed to apply on top of branch "release/2.2":

Applying: workflows: skip non-CI jobs in private forks
Using index info to reconstruct a base tree...
M	.github/workflows/api-release.yml
A	.github/workflows/buf-breaking.yml
M	.github/workflows/nightly.yml
M	.github/workflows/release.yml
M	.github/workflows/scorecards.yml
Falling back to patching base and 3-way merge...
Auto-merging .github/workflows/api-release.yml
CONFLICT (modify/delete): .github/workflows/buf-breaking.yml deleted in HEAD and modified in workflows: skip non-CI jobs in private forks.  Version workflows: skip non-CI jobs in private forks of .github/workflows/buf-breaking.yml left in tree.
Auto-merging .github/workflows/nightly.yml
Auto-merging .github/workflows/release.yml
Auto-merging .github/workflows/scorecards.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 workflows: skip non-CI jobs in private forks

Details

In response to this:

/cherry-pick release/2.4
/cherry-pick release/2.3
/cherry-pick release/2.2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@samuelkarp samuelkarp added cherry-pick/2.2.x Change to be cherry picked to release/2.2 branch cherry-pick/2.3.x Change to be cherry picked to release/2.3 cherry-pick/2.4.x Change to be cherry picked to release/2.4 labels Sep 26, 2026
@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@samuelkarp: #14232 failed to apply on top of branch "release/2.3":

Applying: workflows: skip non-CI jobs in private forks
Applying: ci: skip linters steps in private repositories
Using index info to reconstruct a base tree...
M	.github/workflows/ci.yml
Falling back to patching base and 3-way merge...
Auto-merging .github/workflows/ci.yml
CONFLICT (content): Merge conflict in .github/workflows/ci.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0002 ci: skip linters steps in private repositories

Details

In response to this:

/cherry-pick release/2.4
/cherry-pick release/2.3
/cherry-pick release/2.2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@samuelkarp: new pull request created: #14237

Details

In response to this:

/cherry-pick release/2.4
/cherry-pick release/2.3
/cherry-pick release/2.2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@samuelkarp samuelkarp added cherry-picked/2.2.x PR commits are cherry-picked into release/2.2 branch cherry-picked/2.4.x PR commits are cherry picked into release/2.4 branch and removed cherry-pick/2.2.x Change to be cherry picked to release/2.2 branch cherry-pick/2.4.x Change to be cherry picked to release/2.4 cherry-pick/2.3.x Change to be cherry picked to release/2.3 labels Sep 28, 2026
@samuelkarp samuelkarp added cherry-picked/2.3.x PR commits are cherry picked into release/2.3 branch cherry-pick/2.0.x Change to be cherry picked to release/2.0 branch labels Sep 28, 2026
@samuelkarp samuelkarp added cherry-picked/2.0.x PR commits are cherry picked into the release/2.0 branch and removed cherry-pick/2.0.x Change to be cherry picked to release/2.0 branch labels Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/2.0.x PR commits are cherry picked into the release/2.0 branch cherry-picked/2.2.x PR commits are cherry-picked into release/2.2 branch cherry-picked/2.3.x PR commits are cherry picked into release/2.3 branch cherry-picked/2.4.x PR commits are cherry picked into release/2.4 branch size/S

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants