mirror of
https://github.com/hanyixuanten/hanyixuanten.git
synced 2026-11-03 11:56:39 +00:00
Add GitHub Actions workflow to update README cards
This commit is contained in:
1 parent
269562f1f5
commit
aa4bfab213
1 file changed
+48
-2
@@ -1,2 +1,48 @@
|
|||||||
- name: GitHub Readme Stats Action
|
name: Update README cards
|
||||||
uses: stats-organization/[email protected]
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *" # Runs once daily at midnight
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Generate stats card
|
||||||
|
uses: stats-organization/github-readme-stats-action@v2
|
||||||
|
with:
|
||||||
|
card: stats
|
||||||
|
options: username=${{ github.repository_owner }}&show_icons=true
|
||||||
|
path: profile/stats.svg
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Generate top languages card
|
||||||
|
uses: stats-organization/github-readme-stats-action@v2
|
||||||
|
with:
|
||||||
|
card: top-langs
|
||||||
|
options: username=${{ github.repository_owner }}&layout=compact&langs_count=6
|
||||||
|
path: profile/top-langs.svg
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Generate pin card
|
||||||
|
uses: stats-organization/github-readme-stats-action@v2
|
||||||
|
with:
|
||||||
|
card: pin
|
||||||
|
options: username=stats-organization&repo=github-readme-stats
|
||||||
|
path: profile/pin-stats-organization-github-readme-stats.svg
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Commit cards
|
||||||
|
run: |
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
git add profile/*.svg
|
||||||
|
git commit -m "Update README cards" || exit 0
|
||||||
|
git push
|
||||||
Reference in new issue
Block a user