Skip to content

ci: restrict specific workflows to the upstream repository#28778

Open
nimdrak wants to merge 1 commit into
containers:mainfrom
nimdrak:disable_workflows_in_the_forked
Open

ci: restrict specific workflows to the upstream repository#28778
nimdrak wants to merge 1 commit into
containers:mainfrom
nimdrak:disable_workflows_in_the_forked

Conversation

@nimdrak
Copy link
Copy Markdown
Contributor

@nimdrak nimdrak commented May 25, 2026

What does this PR do?

Fixed #28757

All GitHub workflows fail because they require secrets. The only exception is zizmor.yaml, which runs a static analysis security check on GitHub Actions.

Here is the corrected list of workflows that should be restricted to upstream(containers/podman), categorized by why they will fail or act improperly in a fork:

  1. Require Custom Upstream Secrets
    They rely on secrets that are only available in the upstream repository:
  • check_cirrus_cron.yml: Uses ACTION_MAIL_* secrets for alerting.
  • cherry-pick.yml: Uses CHERRY_PICK_TOKEN to automate pushing to release branches.
  • dev-bump.yml: Uses PODMANBOT_TOKEN to push version bumps.
  • first_contrib_cert_generator.yml: Uses CERTIFICATES_REPO_TOKEN to commit to the external contributor certificates repo.
  • issue_pr_lock.yml: Uses STALE_LOCKING_APP_PRIVATE_KEY and ACTION_MAIL_* secrets.
  • machine-os-pr.yml: Uses PODMANBOT_TOKEN to push updates.
  • release.yml: The primary release pipeline; requires Apple signing (MACOS_*), Azure signing (AZ_*), ACTION_MAIL_*, and PODMANBOT_TOKEN.
  • update-podmanio.yml: Uses PODMANBOT_TOKEN to push updates to the containers/podman.io repository.
  1. Manage Upstream Issue/PR Tracker State
    These workflows require write permissions to automatically manage issues, labels, and assignments.
  • assign.yml: Self-assigns issues.
  • issue-labeler.yml: Automatically applies labels to new issues.
  • labeler.yml: Automatically applies labels to PRs based on changed file paths.
  • needs-info-labeler.yaml: Automates comments when the needs-info label is added.
  • stale.yml: Marks older issues and PRs as stale and closes them.

➕ Additional Details
I refactored several complex if conditions using YAML multi-line strings (|) to improve readability and maintainability.

Does this PR introduce a user-facing change?

None

@nimdrak nimdrak marked this pull request as draft May 26, 2026 01:23
Many GitHub Actions workflows currently trigger on user forks, leading to
unnecessary CI resource consumption, unwanted bot behavior, and inevitable
failures. This commit restricts these specific workflows to only run on the
primary `containers/podman` repository.

The restricted workflows fall into two main categories:
1. Require Custom Upstream Secrets: Workflows like `release`, `mac-pkg`,
   `cherry-pick`, and `dev-bump` rely on secrets (e.g., Apple/Azure certs,
   PODMANBOT_TOKEN, ACTION_MAIL_*) that are unavailable in forks.
2. Manage Upstream Tracker State: Workflows like `assign`, `stale`, and
   `labeler` are intended strictly for managing the primary project's
   issues and PRs. Running them on personal forks creates unwanted noise.

Additionally, refactored several complex `if` conditions using YAML
multi-line strings (`|`) to maintain and improve readability.

Signed-off-by: Byounguk Lee <nimdrak@gmail.com>
@nimdrak nimdrak force-pushed the disable_workflows_in_the_forked branch from 35aa661 to 148c2fc Compare May 26, 2026 05:11
@nimdrak nimdrak marked this pull request as ready for review May 26, 2026 05:19
@packit-as-a-service
Copy link
Copy Markdown

[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore.

@nimdrak
Copy link
Copy Markdown
Contributor Author

nimdrak commented May 26, 2026

The failed tests are not related with this PR

Copy link
Copy Markdown
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

We move the repo soon, lets wait with this until we have the new nmae as we need to change the name again otherwise in a follow up commit.

@nimdrak
Copy link
Copy Markdown
Contributor Author

nimdrak commented May 28, 2026

@Luap99 Got it, thanks for letting me know!

@Luap99
Copy link
Copy Markdown
Member

Luap99 commented May 29, 2026

The new repo location will be podman-container-tools/podman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable check_cirrus_cron workflow on forked repositories

2 participants