|
name: Update README stats |
|
|
|
on: |
|
push: |
|
branches: [main] |
|
schedule: |
|
- cron: "0 */6 * * *" |
|
repository_dispatch: |
|
types: [update-languages] |
|
workflow_dispatch: |
|
|
|
concurrency: |
|
group: update-readme-stats |
|
cancel-in-progress: true |
|
|
|
permissions: |
|
contents: write |
|
|
|
jobs: |
|
update: |
|
runs-on: ubuntu-latest |
|
|
|
steps: |
|
- uses: actions/checkout@v6 |
|
|
|
- name: Generate all language statistics |
|
env: |
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|
run: node .github/scripts/generate-languages.mjs |
|
|
|
- name: Commit statistics |
|
run: | |
|
git config user.name "github-actions[bot]" |
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" |
|
git add profile/languages.svg |
|
git commit -m "Update profile statistics" || exit 0 |
|
git push |