question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can this be used with GitHub package registry?

See original GitHub issue

Hi,

I’m currently trying to figure out if this action can be used with GitHub package registry. So this was my attempt:

      with:
        username: ${{ env.GITHUB_ACTOR }}
        password: ${{ secrets.GITHUB_TOKEN }}
        registry: docker.pkg.github.com
        ...

However, this nonetheless fails with

Error: both username and password must be set to login

I suspect the username is the problem, however this is how this docker action is authenticating: https://github.com/matootie/github-docker/blob/master/index.js#L39

I do not want to add a personal access token so I could publish this with my username and my personal access token, although that would probably work.

Does anyone know how to make this work with the injected GITHUB_TOKEN?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
zappy-shucommented, Mar 19, 2020

Hi @leoschweizer thanks for your feedback. I’ll look into this as it should “just work”.

Have you tried using the github context vars instead of env and secrets? https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context

E.g.

username: ${{ github.actor }}
password: ${{ github.token }}
3reactions
zappy-shucommented, Mar 19, 2020

Thanks for checking. I’ll add an example to the readme for others to use

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with the npm registry - GitHub Docs
The GitHub Packages registry stores npm packages within your organization or personal account, and allows you to associate a package with a repository....
Read more >
GitHub Package Registry: Is it Worth Trying Out?
Step 1: Authenticate to GitHub Package Registry. First, you need to have a GitHub access token to authenticate your identity to the GitHub ......
Read more >
How to use the GitHub Package Registry | by Sam Redmond
If you go to the repository and click on the package you'll see that you can simply npm install the package. With my...
Read more >
Everything You Need To Know About The GitHub Package ...
The GitHub Package Registry allows you to develop your code and host your packages in one place. You can use packages from the...
Read more >
Private npm packages in Github package registry | by Jacob Do
Create the package · Put the package in a Github repository · Authorise to publish on the registry · Add token to your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found