mirror of
https://git.ari.lt/ari/forgejo-stats.git
synced 2024-12-22 14:32:45 +00:00
improve stats workflow
Signed-off-by: Ari Archer <ari@ari.lt>
This commit is contained in:
parent
d4c1f05aed
commit
a63f061ab6
1 changed files with 1 additions and 6 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue