Skip to content

Commit 47483a8

Browse files
committed
t4
1 parent a10cc0b commit 47483a8

19 files changed

+114
-99
lines changed

.github/workflows/build_master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
5151
# Build the mdBook
5252
- name: Build mdBook
53-
run: MDBOOK_BOOK__LANGUAGE=en mdbook build
53+
run: MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
5454

5555
# Cat hacktricks-preprocessor.log
5656
#- name: Cat hacktricks-preprocessor.log

.github/workflows/translate_af.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ jobs:
4646
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
4747
git config --global user.name 'Translator'
4848
git config --global user.email '[email protected]'
49-
git checkout af
49+
git config pull.rebase false
50+
git checkout $BRANCH
5051
git pull
5152
git checkout master
5253
@@ -58,18 +59,18 @@ jobs:
5859
echo -n "$file , " >> /tmp/file_paths.txt
5960
fi
6061
done
61-
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
62+
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
6263
6364
- name: Commit and push changes
6465
run: |
65-
git checkout af
66+
git checkout $BRANCH
6667
git add -A
67-
git commit -m "Translated Afrikaans files" || true
68-
git push --set-upstream origin af
68+
git commit -m "Translated $LANGUAGE files" || true
69+
git push --set-upstream origin $BRANCH
6970
7071
- name: Build mdBook
7172
run: |
72-
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
73+
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
7374
7475
# Login in AWs
7576
- name: Configure AWS credentials using OIDC

.github/workflows/translate_de.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ jobs:
4646
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
4747
git config --global user.name 'Translator'
4848
git config --global user.email '[email protected]'
49-
git checkout af
49+
git config pull.rebase false
50+
git checkout $BRANCH
5051
git pull
5152
git checkout master
5253
@@ -58,18 +59,18 @@ jobs:
5859
echo -n "$file , " >> /tmp/file_paths.txt
5960
fi
6061
done
61-
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
62+
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
6263
6364
- name: Commit and push changes
6465
run: |
65-
git checkout af
66+
git checkout $BRANCH
6667
git add -A
67-
git commit -m "Translated Afrikaans files" || true
68-
git push --set-upstream origin af
68+
git commit -m "Translated $LANGUAGE files" || true
69+
git push --set-upstream origin $BRANCH
6970
7071
- name: Build mdBook
7172
run: |
72-
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
73+
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
7374
7475
# Login in AWs
7576
- name: Configure AWS credentials using OIDC

.github/workflows/translate_el.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ jobs:
4646
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
4747
git config --global user.name 'Translator'
4848
git config --global user.email '[email protected]'
49-
git checkout af
49+
git config pull.rebase false
50+
git checkout $BRANCH
5051
git pull
5152
git checkout master
5253
@@ -58,18 +59,18 @@ jobs:
5859
echo -n "$file , " >> /tmp/file_paths.txt
5960
fi
6061
done
61-
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
62+
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
6263
6364
- name: Commit and push changes
6465
run: |
65-
git checkout af
66+
git checkout $BRANCH
6667
git add -A
67-
git commit -m "Translated Afrikaans files" || true
68-
git push --set-upstream origin af
68+
git commit -m "Translated $LANGUAGE files" || true
69+
git push --set-upstream origin $BRANCH
6970
7071
- name: Build mdBook
7172
run: |
72-
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
73+
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
7374
7475
# Login in AWs
7576
- name: Configure AWS credentials using OIDC

.github/workflows/translate_es.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ jobs:
4646
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
4747
git config --global user.name 'Translator'
4848
git config --global user.email '[email protected]'
49-
git checkout af
49+
git config pull.rebase false
50+
git checkout $BRANCH
5051
git pull
5152
git checkout master
5253
@@ -58,18 +59,18 @@ jobs:
5859
echo -n "$file , " >> /tmp/file_paths.txt
5960
fi
6061
done
61-
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
62+
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
6263
6364
- name: Commit and push changes
6465
run: |
65-
git checkout af
66+
git checkout $BRANCH
6667
git add -A
67-
git commit -m "Translated Afrikaans files" || true
68-
git push --set-upstream origin af
68+
git commit -m "Translated $LANGUAGE files" || true
69+
git push --set-upstream origin $BRANCH
6970
7071
- name: Build mdBook
7172
run: |
72-
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
73+
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
7374
7475
# Login in AWs
7576
- name: Configure AWS credentials using OIDC

.github/workflows/translate_fr.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ jobs:
4646
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
4747
git config --global user.name 'Translator'
4848
git config --global user.email '[email protected]'
49-
git checkout af
49+
git config pull.rebase false
50+
git checkout $BRANCH
5051
git pull
5152
git checkout master
5253
@@ -58,18 +59,18 @@ jobs:
5859
echo -n "$file , " >> /tmp/file_paths.txt
5960
fi
6061
done
61-
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
62+
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
6263
6364
- name: Commit and push changes
6465
run: |
65-
git checkout af
66+
git checkout $BRANCH
6667
git add -A
67-
git commit -m "Translated Afrikaans files" || true
68-
git push --set-upstream origin af
68+
git commit -m "Translated $LANGUAGE files" || true
69+
git push --set-upstream origin $BRANCH
6970
7071
- name: Build mdBook
7172
run: |
72-
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
73+
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
7374
7475
# Login in AWs
7576
- name: Configure AWS credentials using OIDC

.github/workflows/translate_hi.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ jobs:
4646
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
4747
git config --global user.name 'Translator'
4848
git config --global user.email '[email protected]'
49-
git checkout af
49+
git config pull.rebase false
50+
git checkout $BRANCH
5051
git pull
5152
git checkout master
5253
@@ -58,18 +59,18 @@ jobs:
5859
echo -n "$file , " >> /tmp/file_paths.txt
5960
fi
6061
done
61-
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
62+
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
6263
6364
- name: Commit and push changes
6465
run: |
65-
git checkout af
66+
git checkout $BRANCH
6667
git add -A
67-
git commit -m "Translated Afrikaans files" || true
68-
git push --set-upstream origin af
68+
git commit -m "Translated $LANGUAGE files" || true
69+
git push --set-upstream origin $BRANCH
6970
7071
- name: Build mdBook
7172
run: |
72-
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
73+
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
7374
7475
# Login in AWs
7576
- name: Configure AWS credentials using OIDC

.github/workflows/translate_it.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ jobs:
4646
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
4747
git config --global user.name 'Translator'
4848
git config --global user.email '[email protected]'
49-
git checkout af
49+
git config pull.rebase false
50+
git checkout $BRANCH
5051
git pull
5152
git checkout master
5253
@@ -58,18 +59,18 @@ jobs:
5859
echo -n "$file , " >> /tmp/file_paths.txt
5960
fi
6061
done
61-
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
62+
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
6263
6364
- name: Commit and push changes
6465
run: |
65-
git checkout af
66+
git checkout $BRANCH
6667
git add -A
67-
git commit -m "Translated Afrikaans files" || true
68-
git push --set-upstream origin af
68+
git commit -m "Translated $LANGUAGE files" || true
69+
git push --set-upstream origin $BRANCH
6970
7071
- name: Build mdBook
7172
run: |
72-
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
73+
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
7374
7475
# Login in AWs
7576
- name: Configure AWS credentials using OIDC

.github/workflows/translate_ja.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ jobs:
4646
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
4747
git config --global user.name 'Translator'
4848
git config --global user.email '[email protected]'
49-
git checkout af
49+
git config pull.rebase false
50+
git checkout $BRANCH
5051
git pull
5152
git checkout master
5253
@@ -58,18 +59,18 @@ jobs:
5859
echo -n "$file , " >> /tmp/file_paths.txt
5960
fi
6061
done
61-
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
62+
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
6263
6364
- name: Commit and push changes
6465
run: |
65-
git checkout af
66+
git checkout $BRANCH
6667
git add -A
67-
git commit -m "Translated Afrikaans files" || true
68-
git push --set-upstream origin af
68+
git commit -m "Translated $LANGUAGE files" || true
69+
git push --set-upstream origin $BRANCH
6970
7071
- name: Build mdBook
7172
run: |
72-
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
73+
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
7374
7475
# Login in AWs
7576
- name: Configure AWS credentials using OIDC

.github/workflows/translate_ko.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ jobs:
4646
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
4747
git config --global user.name 'Translator'
4848
git config --global user.email '[email protected]'
49-
git checkout af
49+
git config pull.rebase false
50+
git checkout $BRANCH
5051
git pull
5152
git checkout master
5253
@@ -58,18 +59,18 @@ jobs:
5859
echo -n "$file , " >> /tmp/file_paths.txt
5960
fi
6061
done
61-
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
62+
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
6263
6364
- name: Commit and push changes
6465
run: |
65-
git checkout af
66+
git checkout $BRANCH
6667
git add -A
67-
git commit -m "Translated Afrikaans files" || true
68-
git push --set-upstream origin af
68+
git commit -m "Translated $LANGUAGE files" || true
69+
git push --set-upstream origin $BRANCH
6970
7071
- name: Build mdBook
7172
run: |
72-
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
73+
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
7374
7475
# Login in AWs
7576
- name: Configure AWS credentials using OIDC

0 commit comments

Comments
 (0)