Skip to content

Container Repositories

Jonas Brømsø edited this page Jul 5, 2026 · 1 revision

GitHub Repositories

Use the GitHub Packages Container registry by changing the image reference from Docker Hub to ghcr.io.

In your workflow, replace Docker Hub image references like docker://alpine:3.8 with a GitHub Packages image, for example:

uses: docker://ghcr.io/OWNER/IMAGE_NAME

If the workflow needs to pull or push a package, log in with GITHUB_TOKEN:

- name: Log in to the Container registry
  uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
  with:
    registry: ghcr.io
    username: ${{ github.actor }}
    password: ${{ secrets.GITHUB_TOKEN }}

Make sure the job has the right permissions:

permissions:
  contents: read
  packages: write

If the package is private, add the repository to the package under Manage Actions access so the workflow can access it.

Reference: Publishing and installing a package with GitHub Actions

Clone this wiki locally