mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2025-12-07 21:30:47 -08:00
f
This commit is contained in:
4
.github/workflows/build_master.yml
vendored
4
.github/workflows/build_master.yml
vendored
@@ -95,8 +95,8 @@ jobs:
|
||||
TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M:%S UTC")
|
||||
git commit -m "Update searchindex files - ${TIMESTAMP}" --allow-empty
|
||||
|
||||
# Force push to replace main branch (deletes history, keeps all files)
|
||||
git push -f origin new-main:main
|
||||
# Force push to replace master branch (deletes history, keeps all files)
|
||||
git push -f origin new-main:master
|
||||
|
||||
echo "Successfully reset repository history and pushed all searchindex files"
|
||||
|
||||
|
||||
6
.github/workflows/translate_all.yml
vendored
6
.github/workflows/translate_all.yml
vendored
@@ -201,7 +201,7 @@ jobs:
|
||||
MAX_RETRIES=20
|
||||
RETRY_COUNT=0
|
||||
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
|
||||
if git push origin main; then
|
||||
if git push origin master; then
|
||||
echo "Successfully pushed on attempt $((RETRY_COUNT + 1))"
|
||||
break
|
||||
else
|
||||
@@ -210,11 +210,11 @@ jobs:
|
||||
echo "Push failed, attempt $RETRY_COUNT/$MAX_RETRIES. Pulling and retrying..."
|
||||
|
||||
# Try normal rebase first
|
||||
if git pull --rebase origin main 2>&1 | tee /tmp/pull_output.txt; then
|
||||
if git pull --rebase origin master 2>&1 | tee /tmp/pull_output.txt; then
|
||||
echo "Rebase successful, retrying push..."
|
||||
else
|
||||
# If rebase fails due to divergent histories (orphan branch reset), re-clone
|
||||
if grep -q "unrelated histories\|refusing to merge\|fatal: invalid upstream" /tmp/pull_output.txt; then
|
||||
if grep -q "unrelated histories\|refusing to merge\|fatal: invalid upstream\|couldn't find remote ref" /tmp/pull_output.txt; then
|
||||
echo "Detected history rewrite, re-cloning repository..."
|
||||
cd /tmp
|
||||
rm -rf searchindex-repo
|
||||
|
||||
Reference in New Issue
Block a user