Skip to content

Commit

Permalink
Login to GHCR in order to have access to private Docker images for e2…
Browse files Browse the repository at this point in the history
…e tests.
  • Loading branch information
tdonohue committed Dec 16, 2024
1 parent 686b619 commit cd50000
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -111,6 +112,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)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cd50000

Please sign in to comment.