Skip to content
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

fix: anticipated docker push issue #279

Merged
merged 1 commit into from
Dec 14, 2021
Merged

fix: anticipated docker push issue #279

merged 1 commit into from
Dec 14, 2021

Conversation

YC
Copy link
Collaborator

@YC YC commented Dec 14, 2021

Resolves #278

@YC YC requested a review from muety December 14, 2021 10:13
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@muety
Copy link
Owner

muety commented Dec 14, 2021

Thanks your super fast reaction! Can you give a brief explanation, please?

@YC
Copy link
Collaborator Author

YC commented Dec 14, 2021

Thanks your super fast reaction! Can you give a brief explanation, please?

I encountered this issue around 2 weeks ago, when I wanted to push one of my docker image to ghcr with a slightly adjusted version of our workflow.

This is an example run of our last working configuration.
https://github.com/muety/wakapi/actions/runs/1328392599/workflow
This PR adds ghcr tags on top of that.

I don't believe we can use metadata-action in the intended way since we are publishing 2 images (alpine and non-alpine).
https://github.com/docker/metadata-action#basic
https://docs.github.com/en/actions/publishing-packages/publishing-docker-images#publishing-images-to-docker-hub-and-github-packages
However, this does show that it's possible to publish to both Docker Hub and Github Packages with one workflow and I'm pretty certain that we don't need to provide the Github credentials explicitly.

I haven't tried it out in practice, but here is a tutorial with this configuration:
https://event-driven.io/en/how_to_buid_and_push_docker_image_with_github_actions/

Apologies for not creating a PR earlier.

@muety muety merged commit 1c0477f into master Dec 14, 2021
@muety
Copy link
Owner

muety commented Dec 14, 2021

Thanks a lot for that fix and your detailed explanation! :)

@YC YC deleted the docker branch December 15, 2021 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to publish Docker image
2 participants