I'm using both GitHub Package Registry and GitHub Actions beta, and am trying to get them to work together. What I'd like to do is build a Docker image of my application, push the image to Package Registry, and then deploy. I've been trying to get this to work since the new Actions was released without much success, and have kind of given up at this point.
The final problem that stumped me is the Docker client version installed on the available environments. Here's an error message I get trying to do an image push:
Pushing app (docker.pkg.github.com/***/blog/blog:1f6d5db2122ee127a7e7c6900cf3382717d2e69d)... The push refers to repository [docker.pkg.github.com/***/blog/blog] [DEPRECATION NOTICE] registry v2 schema1 support will be removed in an upcoming release. Please contact admins of the docker.pkg.github.com registry NOW to avoid future disruption. manifest invalid: Only schema version 2 is supported ##[error]Process completed with exit code 1.
Here's a public link to an example run: https://github.com/sagebind/blog/runs/201128221. So I think to myself, "Hmm, maybe there's some Docker version mismatch going on." So I set up a new run that spits out docker -v:
Docker version 3.0.6, build a63faebc
Wait, what? As in, like, actual Docker version 3.0.6? (Most recent as of this writing is 19.03.2.) Either this environment comes with some version of Docker from the early Middle Ages (Docker version scheme corresponds to the year of release), or is some kind of special build. Either way, it doesn't seem to support the current Docker protocols that GPR (GitHub Package Registry) uses, which makes it kinda useless to me. I'm sure I could do some funky Docker-in-Docker thing to get it to work, but that just seems silly.
Any tips? Or plans on providing a version of Docker compatible with GPR? I realize that this is in beta, but I'd like to see this fixed so I can start really using it, and this seems like an intended use-case.
You're entirely correct, this is a problem with the GitHub environment. I'm running into the same issue. Pretty silly, cause I think this might be one of the most common uses of Actions.
I am not able to reproduce this issue with a normal docker push https://github.com/chrispat/actions-container-service/commit/e6f861c14cc9f7e967cd341d424a886479d8701....
I see in your workflow you seem to be using docker-compose push. I wonder if that has something to do with it.
See https://github.community/t5/GitHub-Actions/What-really-is-docker-3-0-6/m-p/30752#M542 for more details about the docker version on the Linux runners.
I don't have a full sha in mine and I'm getting the same issue. I use year/month/day without slashes like 20191120 and it broke for me. Unless it was detecting a few builds I did months ago, then I don't know how I would fix it.