-
Notifications
You must be signed in to change notification settings - Fork 62
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
Personal Docker Registry #41
Comments
Hi @marksalpeter - thanks for the kind words! If I understand your use case properly, this is certainly possible. Can you share the snippet of your workflow |
Hi @mr-smithers-excellent! Thanks for taking the time. My repo lives on my personal GitHub account (marksalpeter) and, yes, I'd like the resulting image to end up on my personal account as well. Here's the cd workflow so far in its entirety: name: cd
on:
pull_request:
types: [closed]
branches: [main]
jobs:
version:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.pull_request.merged == true
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Increment Version + Generate Changelog
id: changelog
uses: TriPSs/conventional-changelog-action@v3
with:
github-token: ${{ secrets.github_token }}
skip-version-file: true
output-file: false
skip-commit: true
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
- name: Docker Build & Push
uses: mr-smithers-excellent/docker-build-push@v5
with:
image: marksalpeter/golang-microservice-boilerplate
tags: ${{ steps.changelog.outputs.tag }}, latest
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} |
@marksalpeter - thanks, I've finally figured this out through adding some e2e tests (forthcoming). Currently, I'm expecting the GHCR url to be I fully realize that's what's in the docs, so I'll be ensuring that works in a new release with e2e tests this evening. Stay tuned. |
At some point since I added GitHub Docker registry support, GitHub migrated to a new container registry. I've been able to patch the The key difference between the two is where your images reside. For example:
I've added e2e tests and updated examples for both scenarios, if you'd like to consider both options. One key thing to keep in mind, I was only able to push to |
Same issue |
@laopaoer-wallet - can you provide a snippet of your config? |
@mr-smithers-excellent Thanks for getting to the bottom of this! I think the new container registry pattern looks good to me. I can’t imagine needing more than one container per repo and I could easily make a parallel naming structure that would satisfy my OCD 😂. The need for a custom key must be at least part of the reason why I wasn’t able to push before. Is that a bug on GitHub’s end? If I recall correctly, their docs seem to suggest that Anyway I’ll try the patch first thing tomorrow. Thanks again for all the hard work 🙏🏻 |
@marksalpeter no problem at all! You are exactly correct. At the end of the day this seems to be a permissions issue with the default So essentially you're faced with two solutions:
|
A quick update about the |
Super helpful. Hard to navigate those forums - good find! |
Yea, I left a comment about that on the thread 😂 |
So, I'm going to close this ticket. I think it's resolved as it can be for now. Thanks for all the help @mr-smithers-excellent 🙏 |
First, thanks for maintaining this excellent package! Its much easier to configure than
docker/build-push-action@v2
and I was able to make a ton of progress in a short amount of time with it.That said, I can't seem to get this to work for my project. I think it has something to do with the repo belonging to my personal account. I don't want to publish to a github organizations registry. Is that possible with this action?
Heres the full log for reference:
The text was updated successfully, but these errors were encountered: