Skip to content

Commit dad6b31

Browse files
kanasznagyzoltantdonohue
authored andcommitted
QREPO-406 Only attempt the login on the upstream repository: dspace/dspace-angular
1 parent 746f21a commit dad6b31

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,12 @@ jobs:
122122
retention-days: 14
123123

124124
# Login to our Docker registry, so that we can access private Docker images using "docker compose" below.
125+
# Only attempt the login on the upstream repository: forks cannot authenticate against
126+
# ghcr.io/dspace/* with their own GITHUB_TOKEN. The DSpace test images are public on GHCR,
127+
# so anonymous pulls in the subsequent "docker compose" steps work fine on forks.
125128
- name: Login to ${{ env.DOCKER_REGISTRY }}
126129
uses: docker/login-action@v4
130+
if: github.repository == 'dspace/dspace-angular'
127131
with:
128132
registry: ${{ env.DOCKER_REGISTRY }}
129133
username: ${{ github.repository_owner }}

0 commit comments

Comments
 (0)