-
I joined GitHub Actions and GitHub Package Registry. According to Solved: Github Action Build Caching - GitHub Community Forum, we can skip docker build step for using GitHub Actions. GitHub Actions v2 can pull the docker images that are published on Docker Hub now. Can GitHub Actions v2 pull the docker images from GitHub Package Registry? Is this on the roadmap? |
Beta Was this translation helpful? Give feedback.
Replies: 16 comments 1 reply
-
> Using packages in Actions > > We’re continuing to bring Actions and Package Registry closer together, starting with removing the need to use personal access tokens to access packages from Actions. I got it. Thank you. |
Beta Was this translation helpful? Give feedback.
-
I’m not sure how this solves the issue. Can you please show an example action wherein you are pulling a container image from a public GitHub Docker registry? |
Beta Was this translation helpful? Give feedback.
-
GitHub team is implementing it now. Today (7 Oct.), we cannot use a docker image from GHPR on GitHub Actions.
|
Beta Was this translation helpful? Give feedback.
-
We got this to work by simply using the Docker CLI to do this. Here is my example workflow. The only downside to this workflow is that I cannot conditionally build the Docker container, so it is a bit slower than I want it to be, but I can still build my entire C project in a couple of minutes using this workflow.
|
Beta Was this translation helpful? Give feedback.
-
That’s good but a little complex. I hope that we can use docker images from the Package Registry with the (Today Nov. 12th, we still cannot do that.) |
Beta Was this translation helpful? Give feedback.
-
Yeah, I agree. My current fix comes with a pretty big performance penalty, so it definitely is not ideal. |
Beta Was this translation helpful? Give feedback.
-
Not requiring an auth token to install a published package makes the feature significantly less useful and impossible to use in the way that I wanted: a Docker GitHub Action that uses a container image from the GitHub Package Registry as the base in a There’s no way to build a Docker action that just works with a |
Beta Was this translation helpful? Give feedback.
-
Has something changed here? I’m trying to use a Docker image from a different (public) repository to test my code, I’d like to use it from the registry so I don’t have to build it everytime, since it takes quite long. Trying to log in first doesn’t work because for some reason “docker pull” is run before any job. |
Beta Was this translation helpful? Give feedback.
-
How is this still not solved? Two major “efforts” from GH that don’t actually work together? |
Beta Was this translation helpful? Give feedback.
-
Not being able to use images built on a previous I wonder how this even works with Docker Hub and Google Cloud Registry (GCR), but not with GPR. Seems like an issue with GPR and not Github Actions. |
Beta Was this translation helpful? Give feedback.
-
Today, we still cannot use a Docker image from GitHub Packages in a
|
Beta Was this translation helpful? Give feedback.
-
That’s only true of public images in GCR and Docker Hub though, right? |
Beta Was this translation helpful? Give feedback.
-
The GitHub Container Registry announced today looks like their answer to this issue. It allows anonymous read access and it looks like it could provide more control for managing packages, though it’s accessed by a The other downside is that it looks like a personal access token needs to be created to push to a GitHub org/user-level container repository so a Some useful docs pages about GHCR: |
Beta Was this translation helpful? Give feedback.
-
I came here to figure out how to use my built image as the action but the solved answer didn’t provide that info. I believe this is the relevant documentation on how to use an action that is a built docker image.
|
Beta Was this translation helpful? Give feedback.
-
I had a action that use the container registry:
Since the last week that job has some errors when it is setting up the tests environment:
It is strange because there are some jobs does not have that problem. The behavior is inconsistent. It was working fine, I did not change anything and started to crash. Does anyone has any idea of how to fix that problem? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
The GitHub Container Registry announced today looks like their answer to this issue. It allows anonymous read access and it looks like it could provide more control for managing packages, though it’s accessed by a
ghcr.io/<user_or_org_name>
address.The other downside is that it looks like a personal access token needs to be created to push to a GitHub org/user-level container repository so a
GITHUB_TOKEN
with GitHub repository scope isn’t enough, but at least now everything can live on GitHub instead of needing a separate Docker Hub account.Some useful docs pages about GHCR:
About GHCR
Migrating to GHCR