6
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.

CIで使う場合のsecrets.GITHUB_TOKENのできることできないこと

Posted at

はじめに

rest apiやworkflowをgithub actionなどのCIツールで作るときにgithubのトークンを使います。大体の場合はトークンは「secrets.GITHUB_TOKEN」を使うとできますが、稀にパーミッションエラーになります。
で、githubのsettingから取得できる「Personal Access Token」を使うことになりますが、こと足りるのであればsecrets.GITHUB_TOKENで片付けたいのでどこまでができるのかを確認します。
secrets.GITHUB_TOKENは権限が弱いです。多くのことをやるなら「Personal Access Token」のようです。

secrets.GITHUB_TOKEでできること

公式ページにちゃんと書いてあるのでペタッと貼っときます。
スクリーンショット 2021-04-08 0.54.49.png

見ると大体できるじゃんってなるんですが、注意が必要で、できるものの権限しか書いてません。
つまりはここに書いてあるパーミッションのカテゴリ以外はできないということです。
例えばrepository hooks,blocking,followers,email,membersなどなど。

6
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
6
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?