GitHub Actionsのワークフローを作成してpushしようとしたら、Personal Access Tokenに関するエラーが発生しました。
エラー内容
GitHub Actionsのワークフローを記述した.github/workflows/github-actions-demo.yml
をリモートにpushしようとしたら、以下のエラーが発生しました。
refusing to allow a Personal Access Token to create or update workflow `.github/workflows/github-actions-demo.yml` without `workflow` scope
Personal Access Tokenのworkflow
スコープがないと、ワークフローの作成・更新を拒否するみたいです。
解決法
https://github.com/settings/profile > Developer settings
> Personal access tokes
> Tokens (classic)
> トークンを選択 > Select scopes
内のworkflow
にチェックを入れる > Update token
上記の設定をして、pushできるようになりました。