mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-07-15 21:03:47 +00:00
fix: svg donation generator push fail
This commit is contained in:
@@ -12,6 +12,8 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.PUSH_TOKEN }}
|
||||||
|
|
||||||
- name: Generate donation goal SVG
|
- name: Generate donation goal SVG
|
||||||
run: |
|
run: |
|
||||||
@@ -109,19 +111,18 @@ jobs:
|
|||||||
PYEOF
|
PYEOF
|
||||||
- name: Commit SVG
|
- name: Commit SVG
|
||||||
run: |
|
run: |
|
||||||
git config user.name "github-actions[bot]"
|
git config user.name "LukeGus"
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
git config user.email "bugattiguy527@gmail.com"
|
||||||
git add repo-images/donation-goal.svg
|
git add repo-images/donation-goal.svg
|
||||||
if git diff --cached --quiet; then
|
if git diff --cached --quiet; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
# Amend the previous bot commit if it exists, otherwise create a new one
|
# Amend the previous bot commit if it exists, otherwise create a new one
|
||||||
LAST_AUTHOR=$(git log -1 --format='%ae')
|
LAST_AUTHOR=$(git log -1 --format='%ae')
|
||||||
REMOTE="https://x-access-token:${{ secrets.PUSH_TOKEN }}@github.com/${{ github.repository }}.git"
|
if [ "$LAST_AUTHOR" = "bugattiguy527@gmail.com" ]; then
|
||||||
if [ "$LAST_AUTHOR" = "github-actions[bot]@users.noreply.github.com" ]; then
|
|
||||||
git commit --amend --no-edit
|
git commit --amend --no-edit
|
||||||
git push --force-with-lease "$REMOTE" HEAD:main
|
git push --force-with-lease origin HEAD:main
|
||||||
else
|
else
|
||||||
git commit -m "chore: update donation goal badge"
|
git commit -m "chore: update donation goal badge"
|
||||||
git push "$REMOTE" HEAD:main
|
git push origin HEAD:main
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user