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

Publish to github registry #24

Closed
chenrui333 opened this issue Oct 30, 2019 · 9 comments
Closed

Publish to github registry #24

chenrui333 opened this issue Oct 30, 2019 · 9 comments

Comments

@chenrui333
Copy link

Right now, you have to build the container every time, it would be nice to publish this into github registry or some other docker registry.

https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#example-using-a-docker-public-registry-action

@lawliet89
Copy link

Github Actions have become GA and the minutes for private repositories have become chargeable. This will help save some minutes.

@pascalgn
Copy link
Owner

I understand the need for this, but unfortunately this feature does not seem to be ready yet, see this forum thread: https://github.community/t5/GitHub-Actions/docker-pull-from-public-GitHub-Package-Registry-fail-with-quot/td-p/32782

However, I have pushed v0.6.0 to docker.pkg.github.com now, so when GH enables the feature, you should be able to switch to using the pre-built Docker image immediately.

For security reasons, I recommend to use the full SHA, when referencing the Docker image (as I also recommend when referencing the action from GH directly). So the workflow file should look like this:

# [...]
jobs:
  automerge:
    runs-on: ubuntu-latest
    steps:
      - name: automerge
        uses: "docker://docker.pkg.github.com/pascalgn/automerge-action/automerge-action:c7859ab63774304798c4dd36ed106b59bbf728974117a9f350cac756d80d9e37"
        # [...]

(the usual Docker syntax would be docker.pkg.github.com/pascalgn/automerge-action/automerge-action@sha256:c7859ab63774304798c4dd36ed106b59bbf728974117a9f350cac756d80d9e37, but for some reason GH chose to use a slightly different syntax here)

Also, I pushed that image manually, but when someone finds a good example where the action is automatically built and pushed to docker.pkg.github.com, feel free to link it here!

I will leave this issue open until GH fully supports pulling from docker.pkg.github.com in actions.

@i-Gondor
Copy link

Just had a dig into this as running hundreds of this action a day is eating into our Actions minutes, and Microsoft still has not fixed this issue :(

Thanks for leaving this open though, hopefully we'll see a fix one day

@jrjohnson
Copy link

Not sure I understand how this action differs from others I use, but I get An action could not be found at the URI 'https://api.github.com/repos/pascalgn/automerge-action/tarball/0.8.4' if I use uses: "pascalgn/[email protected]" is that caused by this issue? It's probably worth calling out in the readme because it seems to be unique to this action.

@pascalgn
Copy link
Owner

I think it's not related to this issue, it could be because you use 0.8.4 instead of v0.8.4. If it's fine for you, I would like to ask you to create a new issue for that topic, if you have additional questions/remarks.

@jrjohnson
Copy link

Yup, that was the issue. Sorry for the noise! 😊

@sgraczyk
Copy link

Hi, have you considered publishing the docker image to DockerHub until GitHub solves (if ever) the authentication issue with their own registry?

I'm referring to this answer in the community thread: https://github.community/t/docker-pull-from-public-github-package-registry-fail-with-no-basic-auth-credentials-error/16358/37

PS. I'm not a Docker 🧙 , therefore, I'm not sure if it'll work but I'm willing to help with reducing GH Action minutes usage in this case.

@robert-hung-mox
Copy link

robert-hung-mox commented Oct 20, 2020

However, I have pushed v0.6.0 to docker.pkg.github.com now, so when GH enables the feature, you should be able to switch to using the pre-built Docker image immediately.

Also, I pushed that image manually, but when someone finds a good example where the action is automatically built and pushed to docker.pkg.github.com, feel free to link it here!

I will leave this issue open until GH fully supports pulling from docker.pkg.github.com in actions.

@pascalgn Could this allow us to cache the Docker image here?

@pascalgn
Copy link
Owner

The action is now a JS action and no longer uses Docker now (see #125 and #135) so I will close this 😊

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

No branches or pull requests

7 participants