1
1
Fork 0
mirror of https://git.ari.lt/ari/forgejo-stats.git synced 2024-12-22 06:22:46 +00:00

improve stats workflow

Signed-off-by: Ari Archer <ari@ari.lt>
This commit is contained in:
Ari Archer 2024-06-22 19:58:21 +03:00
parent d4c1f05aed
commit a63f061ab6
No known key found for this signature in database
GPG key ID: A50D5B4B599AF8A2

View file

@ -17,16 +17,12 @@ jobs:
with: with:
token: ${{ secrets.GIT_TOKEN }} token: ${{ secrets.GIT_TOKEN }}
- name: Check for Skip CI in Last Commit - name: Set up repository
id: check_commit id: check_commit
run: | run: |
git reset --hard git reset --hard
git pull git pull
git reset --hard git reset --hard
commit_message=$(git log -1 --pretty=%B)
if echo "$commit_message" | grep -q "\[skip ci\]"; then
echo "Skip CI based on commit message" && exit 78;
fi
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
@ -52,7 +48,6 @@ jobs:
else else
git config --local user.email "stats@localhost" git config --local user.email "stats@localhost"
git config --local user.name "Stats CI/CD" git config --local user.name "Stats CI/CD"
git add commits.png languages.png
git commit -am "[skip ci] Update stats" || echo "No changes to commit" git commit -am "[skip ci] Update stats" || echo "No changes to commit"
git push origin HEAD -f git push origin HEAD -f
fi fi