Skip to content

Commit 8b779f0

Browse files
kanasznagyzoltantdonohue
authored andcommitted
QREPO-406 running codecov only in the upstream repository: dspace/dspace-angular
1 parent a43843e commit 8b779f0

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,11 @@ jobs:
124124
path: 'coverage/dspace-angular/lcov.info'
125125
retention-days: 14
126126

127-
# Login to our Docker registry, so that we can access private Docker images using "docker compose" below.
128-
# Only attempt the login on the upstream repository: forks cannot authenticate against
129-
# ghcr.io/dspace/* with their own GITHUB_TOKEN. The DSpace test images are public on GHCR,
130-
# so anonymous pulls in the subsequent "docker compose" steps work fine on forks.
127+
# Login to our Docker registry, so that we can access Docker images using "docker compose" below.
128+
# This login is required on the upstream repository because DOCKER_REGISTRY is set to ghcr.io
129+
# and pulling ghcr.io/dspace/* requires authentication. On forks, DOCKER_REGISTRY falls back to
130+
# docker.io (see env block above) where the same images are publicly pullable without a login,
131+
# and forks cannot authenticate against ghcr.io/dspace/* with their own GITHUB_TOKEN anyway.
131132
- name: Login to ${{ env.DOCKER_REGISTRY }}
132133
uses: docker/login-action@v4
133134
if: github.repository == 'dspace/dspace-angular'
@@ -321,6 +322,9 @@ jobs:
321322
codecov:
322323
# Must run after 'tests' job above
323324
needs: tests
325+
# Only run on the upstream repository: forks do not have the CODECOV_TOKEN secret,
326+
# and Codecov refuses to create a commit on a protected branch without a token.
327+
if: github.repository == 'dspace/dspace-angular'
324328
runs-on: ubuntu-latest
325329
steps:
326330
- name: Checkout

0 commit comments

Comments
 (0)