Skip to content

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

Closed

Description

@uniqueg

Problem

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

  • "Submit Report to Codecov" has fail_ci_if_error on pushes; forks have no CODECOV_TOKEN (Token required - not valid tokenless upload), so Test (mongomock) fails;
  • push and publish log in to Docker Hub with DOCKERHUB_LOGIN/DOCKERHUB_TOKEN (environment dev-images), 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, security-events: write), publish (Docker Hub login, attestations, cosign signing with OIDC). All other jobs (lint, tests, chart, docs, release readiness, smoke test) need neither secrets nor write permissions; caches write to the fork's own cache.
  • release.yml (tags only): environment release with a required reviewer, Docker Hub pushes, signing; in a fork it fails safely at the first credential, as a release dry run in a fork expects. No change.
  • scan.yml (schedule, manual): scans the published latest; scheduled runs are disabled in forks by default. No change.

Proposed change

As in FOCA (elixir-cloud-aai/foca#546):

  • Codecov: upload errors fail CI only on pushes to 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 (already documented as the way forks publish).
  • scan: otherwise build and scan the image locally, as for pull requests, so that the scan still gates; upload to code scanning only in this repository.
  • 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 unchanged; tests, coverage threshold, linters and builds still apply everywhere.

Activity

  1. added
    priority: medium
    status: in progress
    type: ci / cd
    workload: hours
    on Oct 28, 2026
  2. removed
    status: in progress
    on Oct 28, 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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions