Implement Gitea Action to update README with dynamic stats
Some checks failed
Update Profile Stats / build (push) Failing after 13m55s
Some checks failed
Update Profile Stats / build (push) Failing after 13m55s
This commit is contained in:
@@ -1,7 +1,29 @@
|
||||
- name: Commit and Push changes
|
||||
name: Update Profile Stats
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 * * * *' # Runs every hour
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.9'
|
||||
|
||||
- name: Update README file
|
||||
run: python3 update_profile.py
|
||||
|
||||
- name: Commit and Push
|
||||
run: |
|
||||
git config --local user.email "action@gitea.com"
|
||||
git config --local user.name "Gitea Action"
|
||||
git add README.md
|
||||
git commit -m "Update profile stats" || echo "No changes to commit"
|
||||
git push
|
||||
# Only commit if there are actual changes to avoid errors
|
||||
git diff --quiet && git diff --staged --quiet || (git commit -m "Update profile stats" && git push)
|
||||
Reference in New Issue
Block a user