Update GitHub Stats Gist #1718
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update GitHub Stats Gist | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 */12 * * *' | |
push: | |
branches: master | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-node@master | |
with: | |
node-version: 16 | |
# If you edit the .js files and want to run them in your GitHub Action, you need to: | |
# - uncomment the 2 following lines | |
# - replace "npx github-stats-box@1" with "npm start" | |
# N.B: Your action will not receive future updates if you do so | |
# - uses: actions/checkout@master | |
# - run: npm ci | |
- run: npx github-stats-box@1 | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} # Do not edit, defined in secrets | |
# Edit the following environment variables | |
GIST_ID: d6d145b057ccda9abd1e36a581f2c096 # The ID portion from your gist url | |
ALL_COMMITS: true # If `true` it will count all commits, if `false` it will count your last year commits | |
K_FORMAT: true # If `true`, large numbers will be formatted with a "k", for example "1.5k" |