mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2025-12-12 07:40:49 -08:00
f
This commit is contained in:
18
.github/workflows/translate_all.yml
vendored
18
.github/workflows/translate_all.yml
vendored
@@ -66,16 +66,14 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install wget -y
|
sudo apt-get install wget -y
|
||||||
cd scripts
|
wget -O /tmp/get_and_save_refs.py https://raw.githubusercontent.com/HackTricks-wiki/hacktricks-cloud/master/scripts/get_and_save_refs.py
|
||||||
wget -O get_and_save_refs.py https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/get_and_save_refs.py
|
wget -O /tmp/compare_and_fix_refs.py https://raw.githubusercontent.com/HackTricks-wiki/hacktricks-cloud/master/scripts/compare_and_fix_refs.py
|
||||||
wget -O compare_and_fix_refs.py https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/compare_and_fix_refs.py
|
wget -O /tmp/translator.py https://raw.githubusercontent.com/HackTricks-wiki/hacktricks-cloud/master/scripts/translator.py
|
||||||
wget -O translator.py https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Run get_and_save_refs.py
|
- name: Run get_and_save_refs.py
|
||||||
run: |
|
run: |
|
||||||
python scripts/get_and_save_refs.py
|
python /tmp/get_and_save_refs.py
|
||||||
|
|
||||||
- name: Download language branch & update refs
|
- name: Download language branch & update refs
|
||||||
run: |
|
run: |
|
||||||
pwd
|
pwd
|
||||||
@@ -86,7 +84,7 @@ jobs:
|
|||||||
git config pull.rebase false
|
git config pull.rebase false
|
||||||
git checkout $BRANCH
|
git checkout $BRANCH
|
||||||
git pull
|
git pull
|
||||||
python scripts/compare_and_fix_refs.py --files-unmatched-paths /tmp/file_paths.txt
|
python /tmp/compare_and_fix_refs.py --files-unmatched-paths /tmp/file_paths.txt
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Fix unmatched refs" || echo "No changes to commit"
|
git commit -m "Fix unmatched refs" || echo "No changes to commit"
|
||||||
git push || echo "No changes to push"
|
git push || echo "No changes to push"
|
||||||
@@ -108,7 +106,7 @@ jobs:
|
|||||||
touch /tmp/file_paths.txt
|
touch /tmp/file_paths.txt
|
||||||
|
|
||||||
if [ -s /tmp/file_paths.txt ]; then
|
if [ -s /tmp/file_paths.txt ]; then
|
||||||
python scripts/translator.py \
|
python /tmp/translator.py \
|
||||||
--language "$LANGUAGE" \
|
--language "$LANGUAGE" \
|
||||||
--branch "$BRANCH" \
|
--branch "$BRANCH" \
|
||||||
--api-key "$OPENAI_API_KEY" \
|
--api-key "$OPENAI_API_KEY" \
|
||||||
|
|||||||
Reference in New Issue
Block a user