DevOps Discussion Git

How to use private package on github action

Github provides github action for CI/CD.

For the CI, we could meet some cases to use private packages.

In this case, npm run install will have permission problem. So, we need to set ssh agent.

- name: Set ssh agent
uses: webfactory/ssh-agent@v0.4.1
with:
ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }}

Then it will work for a private repository. of course, you need to set the PRIVATE_SSH_KEY

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *