From dab6b1c12e3dd0f960145dde230fd6d6108af58e Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Mon, 16 Dec 2024 15:09:13 -0600 Subject: [PATCH] Login to GHCR in order to have access to private Docker images for e2e tests. --- .github/workflows/build.yml | 11 ++++++++++- .github/workflows/docker.yml | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4fd83c375..ab03cb3885 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,8 @@ name: Build on: [push, pull_request] permissions: - contents: read # to fetch code (actions/checkout) + contents: read # to fetch code (actions/checkout) + packages: read # to fetch private images from GitHub Container Registry (GHCR) jobs: tests: @@ -117,6 +118,14 @@ jobs: path: 'coverage/dspace-angular/lcov.info' retention-days: 14 + # Login to our Docker registry, so that we can access private Docker images using "docker compose" below. + - name: Login to ${{ env.DOCKER_REGISTRY }} + uses: docker/login-action@v3 + with: + registry: ${{ env.DOCKER_REGISTRY }} + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + # Using "docker compose" start backend using CI configuration # and load assetstore from a cached copy - name: Start DSpace REST Backend via Docker (for e2e tests) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 41b5f2e002..bae8c01300 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -16,7 +16,7 @@ on: pull_request: permissions: - contents: read # to fetch code (actions/checkout) + contents: read # to fetch code (actions/checkout) packages: write # to write images to GitHub Container Registry (GHCR) jobs: