try to fix "fatal: Not possible to fast-forward, aborting"

This commit is contained in:
Lord_Alfred
2021-10-22 12:03:36 +03:00
parent 96a2b10807
commit d26ac6ffbe
+3 -2
View File
@@ -58,6 +58,9 @@ jobs:
run: |
set -euo pipefail
git remote add github "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git pull github ${GITHUB_REF} --ff-only
# Get name & email from 1st commit
git config --local user.email "$(git log --format='%ae' --reverse | head -1)"
git config --local user.name "$(git log --format='%an' --reverse | head -1)"
@@ -71,6 +74,4 @@ jobs:
git commit -m "Auto-update ip ranges"
# push changes
git remote add github "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git pull github ${GITHUB_REF} --ff-only
git push github HEAD:${GITHUB_REF}