LoginSignup
0
0

More than 1 year has passed since last update.

github-profile-summary-cardsのGitHub Actionsではまった事と解決策

Posted at

GitHubのプロフィールページにリポジトリのサマリーカードを生成する github-profile-summary-cards
のGitHub Actionsの設定ではまったこととその解決策について

1. .github/workflows/profile-summary-cards.yml がpushできない

エラー

 ! [remote rejected] feature-profile-summary-cards -> feature-profile-summary-cards (refusing to allow a Personal Access Token to create or update workflow `.github/workflows/profile-summary-cards.yml` without `workflow` scope)
error: failed to push some refs to 'https://github.com/AkioYokoyama/AkioYokoyama.git'

原因

Personal access tokens に workflowの権限がなかった。

解決策

  1. Settings > Developer settings > Personal access tokens > Tokens(classic) へアクセス。
  2. Select scopes の workflow のチェックボックスを ON にする

2. GitHub Actionsが失敗する

エラー

Run vn7n24fzkq/github-profile-summary-cards@release
  with:
    USERNAME: AkioYokoyama
    UTC_OFFSET: 9
  env:
    GITHUB_TOKEN: ***
Start...
Username: AkioYokoyama
UTC offset: 9
Remove old cards...
Creating ProfileDetailsCard...
Creating ReposPerLanguageCard...
Creating CommitsPerLanguageCard...
Creating StatsCard...
Creating ProductiveTimeCard...
Creating preview markdown...
Commit file...
Warning: Commit failed. Retry...
Warning: Commit failed. Retry...
Error: Error: git push 
  
 Invalid status code: 128
Error: git push 

原因

リポジトリの Workflow permissions に write権限がなかった

解決策

  1. リポジトリのSettings > Actions > General へアクセス
  2. Workflow permissions を Read and write permissions へ変更する
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