Skip to content
Discussion options

You must be logged in to vote

I've actually run into this exact problem in our enterprise org too! The uses: docker:// syntax is frustrating because it runs before any of your auth steps.
For private GHCR images, I found two approaches that work reliably:

The job container approach worked best for me:

jobs:
  test:
    runs-on: ubuntu-latest
    container:
      image: ghcr.io/myorg/myrepo/test-action:latest
      credentials:
        username: ${{ github.actor }}
        password: ${{ secrets.GITHUB_TOKEN }}

If you need more flexibility with multiple steps, you can create a Docker action in your repo (just a Dockerfile + action.yml) that references your ghcr image, then use:

steps:
      - uses: actions/checkout@v4
…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tyrelh
Comment options

Answer selected by tyrelh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Packages Host your dependencies, libraries, and production-ready code, right from your repository Question Ask and answer questions about GitHub features and usage
2 participants