Refactor Gitea workflow to simplify Python setup and remove unnecessary commit steps
Some checks failed
Update Profile Stats / build (push) Failing after 1m50s
Some checks failed
Update Profile Stats / build (push) Failing after 1m50s
This commit is contained in:
@@ -8,22 +8,14 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: python:3.9-slim
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Install dependencies
|
||||||
uses: actions/setup-python@v4
|
run: pip install requests
|
||||||
with:
|
|
||||||
python-version: '3.9'
|
|
||||||
|
|
||||||
- name: Update README file
|
- name: Update README file
|
||||||
run: python3 update_profile.py
|
run: python 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
|
|
||||||
# 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