-
Notifications
You must be signed in to change notification settings - Fork 15
Private docker registries
If you already have some process that builds and publishes your docker images, you can greatly speed up pullpreview runs by using those images from within your Docker Compose file.
You can configure pullpreview to auto-log into your private registries by using the registries
input parameter.
For instance, if you want to use the GitHub Docker Container registry, you will need to pass the following registry URI:
uses: pullpreview/action@v5
with:
registries: docker://${{ secrets.GHCR_PAT }}@ghcr.io
In the case of GitHub, the GHCR_PAT
secret must be a Personal Access Token (with read-only access to your org packages) to authenticate against your GHCR.io registry. This documentation link can help you if you're not sure what I'm talking about: https://docs.github.com/en/packages/guides/migrating-to-github-container-registry-for-docker-images#updating-your-github-actions-workflow
So to sum up:
- generate a PAT with read-only access to your packages,
- add it as a secret in your repo where you use pullpreview,
- add the
registries
bit in your workflow file, referencing the secret you just added (e.g.registries: docker://${{ secrets.GHCR_PAT }}@ghcr.io
),