Anyone who knows how I can install private npm pac...
# typescript
Anyone who knows how I can install private npm packages via github actions? I'm using a github ssh link
"foo-abc": "<git+ssh://git>"
The relevant yaml for my github workflow looks like this:
Copy code
- name: setup ssh
          SSH_AUTH_SOCK: /tmp/ssh_agent.sock
        run: |
          mkdir -p ~/.ssh
          ssh-keyscan <|> >> ~/.ssh/known_hosts
          ssh-agent -a $SSH_AUTH_SOCK > /dev/null
          ssh-add - <<< "${{ secrets.GH_PRIVATE_SSH }}"
      - name: npm install
          SSH_AUTH_SOCK: /tmp/ssh_agent.sock
        run: npm install
I believe you need to generate a Personal Access Token with package read scope, and configure
and your
We won't publish to npm, but install via git ssh links. Thanks though ❤️
GitHub has a private package repository. You would be publishing your package to a private repository that another one of your private repositories could read from with the proper Personal Access Token scope
@white-rainbow-68240 have you considered this approach for your use case?
I will look into it. For now, I had the chance to open source the repo, so ended up publishing to npm as an open repo. If we need a private repo, I'd probably go with npm since alpine images don't have git installed. It just works better out-of-the-box with npm.
It's not really a hard problem, but most infra issues just take so much time to solve when you have 5 different services that all need to be integrated correctly.
I’m confused if you mean you’re going to publish your package publicly on — github also offers a private registry that you can use with the npm client
That looks really interesting! I'll give it a chance as soon as we need to do something private.
Just having something a bit more integrated with github actions would make it all simpler
Yeah, using the github packages feature is that. Definitely worth looking into.