0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

GitHub Actions 経由で GitHub の private repo から package を install する

Posted at

GitHub actions上で、以下のように GitHub の private repo を install する必要がある場合の対処方法メモ。

package.json
{
  "dependencies": {
    "privatePackage": "your/privatePackage"
  },
}

以下のように、actions/checkout@v2 に private repo にアクセスできる GitHub Token を渡せば良い

ci.yml
    steps:
      - uses: actions/checkout@v2
        with:
          token: ${{ secrets.PAT }}

actions/checkout@v2 は、その action 以降で使う GitHub Token を固定するため、env 等で設定された GITHUB_TOKEN も上書きされてしまう。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?