-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use GitHub Actions to build Docker container #1181
Conversation
This will require you to to add two secrets The reason for this PR is that the project current uses Docker Hub's Automated Build to generate the containers however per https://www.docker.com/blog/changes-to-docker-hub-autobuilds/ they have disabled auto builds by default unless the project signs up as an official Open Source project, which this project hasn't done. Additionally the Automated Build environment is a bit limited for things like multi-platform builds (which this PR uses) and lots of folks have started to switch to GitHub Actions for container building. |
Note: This PR will fail until the author sets up the Secrets appropriately. |
Start using GitHub Actions to build the Docker container for this project. Builds all tags and master as the latest container tag. Builds for amd64 and arm64.
@cardoe login action is failing despite adding |
Indeed. I'm guessing its failing to auth because its saying |
https://github.com/docker/login-action#docker-hub are the docs for the action. It appears they've moved to v2 so we can try going to v2, otherwise I can only guess its a creds issue. |
Functionally there's no difference between v1 and v2. v2 just requires a newer GitHub Actions Runner version so they treated that a semver change. Only guess is its a cred issue. You made a Personal Access Token https://docs.docker.com/docker-hub/access-tokens/ that had permissions to push to |
@cardoe @mher Looks like this may be a problem with a forked repo: docker/login-action#29 (comment) I believe the workflow may want to be switched to: on:
push:
branches:
- master
tags:
- '*' Which would (theoretically, untested) only publish a new image on a new pushed tag to the master branch. No new images would be generated on PRs (from forks). Thoughts on this approach? I can submit a PR if that sounds good. |
Also, @mher is there a chance you can push a new image for version Apologies for this one-off request, as we have some tight security controls that I'm working around. Much appreciated for being responsive on this one! |
I don't believe you are correct. Those triggers are already done. We additionally include PRs so that we attempt to build the Docker container on PRs. If you look at the login action flower/.github/workflows/docker.yml Line 34 in d91fbbf
|
@cardoe yes, the token has |
Moving secrets from |
Ah, yeah, my bad. Looked at that wrong. Regardless, looks like you have it solved and working. I see the |
Awesome. Thanks for the follow up @mher didn’t even think about the difference between the two. Edit: What was I thinking about master to latest. latest is for the newest release and the code will work right. Next tag everything will be all updated. |
Start using GitHub Actions to build the Docker container for this project. Builds all tags and master as the latest container tag. Builds for amd64 and arm64.
Start using GitHub Actions to build the Docker container for this
project. Builds all tags and master as the latest container tag. Builds
for amd64 and arm64.