Skip to content

Commit 16caef8

Browse files
Create readme-cards.yml
Signed-off-by: LUIZ HAMILTON ROBERTO DA SILVA <[email protected]>
1 parent 241b857 commit 16caef8

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/readme-cards.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Generate README Cards (No External Services)
2+
3+
on:
4+
schedule:
5+
- cron: "17 2 * * *" # daily 02:17 UTC
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-cards:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.11"
22+
23+
- name: Generate SVG cards
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
GITHUB_USERNAME: brazilianscriptguy
27+
run: |
28+
python .github/scripts/generate_readme_cards.py
29+
30+
- name: Commit & push if changed
31+
run: |
32+
git config user.name "github-actions[bot]"
33+
git config user.email "github-actions[bot]@users.noreply.github.com"
34+
git add -A
35+
if git diff --cached --quiet; then
36+
echo "No changes to commit."
37+
else
38+
git commit -m "chore: update README cards"
39+
git push
40+
fi

0 commit comments

Comments
 (0)