GitHub Actions不更新Gist问题的调试方法与解决方法(以waka-box为例)
使用waka-box或waka-box-go时根据其README配置完成后发现Gist未更新,根据Issue #42需要等WakaTime中有数据后才可以更新,于是等到WakaTime有数据后再查看依旧不更新,根据Issue #61,WakaTime每日更新一次,于是等过了一天Gist依旧不更新,尝试删除了GitHub Access Token、fork的Repository和创建的Gist后重新配置依旧失败,在另一个pinned-gist项目productive-box的README中找到Project Setup的第2步:Open the "Actions" tab of your fork and click the "enable" button,于是在fork的repository中的Actions中选择了启用,等待一天后依旧没有更新Gist。受到Issue #51的启发,进入fork的waka-box仓库的/actions下查看All workflows显示两个results:Update gist with WakaTime stats Update gist with WakaTime stats #1: Scheduled和Update gist with WakaTime stats #2: Scheduled并都有绿色对勾,进入workflow:"Update gist with WakaTime stats"下选择任一个result进入显示1 completed job,左边栏update-gist为绿色对勾状态,点击update-gist下的Update Gist项显示httperror: bad credentials。受到Error: Failed to install 'unknown package' from GitHub: HTTP error 401. Bad credentials启发检查Personal access tokens发现之前删除了token,于是重新Generate new token并修改库->Settings->Secrets Update GH_TOKEN后回到Actions下选择最新的result右上角点击Re-run jobs->Re-run all jobs:等待片刻后任务完成,检查Update Gists项详情:
成功运行,此时检查对应Gist发现其已被正确更新。