Skip to content

Instantly share code, notes, and snippets.

@iTonyYo
Last active January 15, 2023 13:08
Show Gist options
  • Save iTonyYo/f0c9746ee9d7a0c10566bf67fa49e5a9 to your computer and use it in GitHub Desktop.
Save iTonyYo/f0c9746ee9d7a0c10566bf67fa49e5a9 to your computer and use it in GitHub Desktop.
Markdown 8 mins ███████████████████▌░ 93.3%
Bash 0 secs █▍░░░░░░░░░░░░░░░░░░░ 6.7%
@iTonyYo
Copy link
Author

iTonyYo commented Jun 3, 2021

如果根据 matchai/waka-boxREADME.md 没能成功实现,可以按照接下来的操作,

  • matchai/waka-box 定义的计划任务频率:每天零点执行一次。所以别期望推送代码后就能看到最终效果;
  • 修改 fork 后项目内的 schedule.yml 配置;
name: Update gist with WakaTime stats
on: 
  schedule:    
    - cron: "0 0 * * *"
jobs:  
  update-gist: 
    runs-on: ubuntu-latest
    steps: 
      - uses: actions/checkout@master      
      - name: Update gist        
-       uses: matchai/waka-box@master 
+       run: node ./dist/index.js
        env:           
           GH_TOKEN: ${{ secrets.GH_TOKEN }} 
           GIST_ID: 968220c97e8da1d047a9a480fa432e54 
           WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
  • 有需要,可以调整计划任务频率,如:每两小时执行一次。这个操作并非必须的。注意,Github Actions 支持的最小频率是:每 5 分钟;
name: Update gist with WakaTime stats
on: 
  schedule:    
- - cron: "0 0 * * *"
+ - cron: "0 */2 * * *"
jobs:  
  update-gist: 
    runs-on: ubuntu-latest
    steps: 
      - uses: actions/checkout@master      
      - name: Update gist        
           run: node ./dist/index.js
        env:           
           GH_TOKEN: ${{ secrets.GH_TOKEN }} 
           GIST_ID: 968220c97e8da1d047a9a480fa432e54 
           WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}

做完这些就没问题了,到时间就可以看到效果。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment