Skip to content

Commit 471f494

Browse files
committed
Update cron schedule & GitHub/Discord env vars
Change scheduled workflow time and switch the job to run the github:usage command. The schedule was updated from '0 0 * * *' (midnight UTC) to '40 1 * * *' (01:40 UTC). Added environment variables to the workflow (GH_USAE_TOKEN, GH_USAGE_USER, DISCORD_WEBHOOK) and updated config/services.php to read GH_USAGE_TOKEN, GH_USAGE_USER, and GH_USAGE_CREDITS instead of the previous GITHUB_* names. Note: the workflow currently contains a likely typo (GH_USAE_TOKEN) that should be GH_USAGE_TOKEN to match the config.
1 parent cf0427e commit 471f494

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/cron.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: cron
33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '0 0 * * *' #UTC
6+
- cron: '40 1 * * *' #UTC
77

88
jobs:
99
cron:
@@ -30,4 +30,8 @@ jobs:
3030
run: php artisan key:generate
3131

3232
- name: Run Command
33-
run: php artisan inspire
33+
run: php artisan github:usage
34+
env:
35+
GH_USAE_TOKEN: ${{ secrets.GH_USAE_TOKEN }}
36+
GH_USAGE_USER: ${{ secrets.GH_USAGE_USER }}
37+
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}

config/services.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
],
3737

3838
'github' => [
39-
'token' => env('GITHUB_USAGE_TOKEN'),
40-
'user' => env('GITHUB_USAGE_USER'),
41-
'included_credits' => env('GITHUB_USAGE_CREDITS', 7000),
39+
'token' => env('GH_USAGE_TOKEN'),
40+
'user' => env('GH_USAGE_USER'),
41+
'included_credits' => env('GH_USAGE_CREDITS', 7000),
4242
],
4343

4444
'discord' => [

0 commit comments

Comments
 (0)