Skip to content

CI fails in forks (Codecov, image push) #546

Closed

Description

@uniqueg

Problem

CI fails in forks although the code is good (seen in uniqueg/foca-plugins, run 40618930367, and FOCA's ci.yml has the same steps). On a push to a fork's dev:

  • "Upload coverage to Codecov" has fail_ci_if_error: true; forks have no CODECOV_TOKEN (Token required - not valid tokenless upload), so Test (Python 3.13, MongoDB 7.0) fails;
  • push and publish log in to Docker Hub with DOCKERHUB_LOGIN/DOCKERHUB_TOKEN, which forks don't have, so they fail; scan is then skipped, and the CI passed gate fails.

Audit of the workflows

  • ci.yml (push to dev, pull requests): Codecov upload (secret), push (Docker Hub login), scan (SARIF upload to code scanning, needs security-events: write), publish (Docker Hub login, attestations, cosign signing with OIDC). All other jobs (lint, tests, lowest dependencies, integration, chart, chart install, release readiness) need neither secrets nor write permissions; pip/uv caches write to the fork's own cache.
  • release.yml, release-chart.yml (tags only): PyPI trusted publishing and Docker Hub/GHCR logins in protected environments; in a fork they fail safely at the first credential, as a release dry run in a fork expects. No change.
  • scan.yml (schedule, manual): scans the published images; scheduled runs are disabled in forks by default, a manual run works without secrets. No change.

Proposed change

  • Codecov: fail_ci_if_error only in this repository; the upload is still attempted everywhere.
  • push/publish: only on pushes to this repository, or to a fork that sets the repository variable DOCKERHUB_ORG, which docs/contributing.md already documents as the way forks publish to their own organization.
  • scan: in forks (without DOCKERHUB_ORG), build and scan the images locally, as for pull requests, so that the scan still gates; upload findings to code scanning only where images are published or for same-repository pull requests here.
  • CI passed: allow push/publish to be skipped whenever the run doesn't publish; still fail on any failed, cancelled or unexpectedly skipped job.
  • Job names and IDs stay unchanged; tests, coverage threshold (fail_under = 100), linters and builds still apply everywhere.

Activity

  1. added
    priority: medium
    status: in progress
    type: ci / cd
    workload: hours
    on Oct 28, 2026
  2. added a commit that references this issue on Oct 28, 2026
  3. removed
    status: in progress
    on Oct 28, 2026
  4. added this to the v0.19.0 milestone on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumtype: ci / cdworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions