This commit is contained in:
Carlos Polop
2025-01-09 02:04:38 +01:00
parent 4fae1360a8
commit 3eff514680
19 changed files with 114 additions and 99 deletions

View File

@@ -50,7 +50,7 @@ jobs:
# Build the mdBook
- name: Build mdBook
run: MDBOOK_BOOK__LANGUAGE=en mdbook build
run: MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Cat hacktricks-preprocessor.log
#- name: Cat hacktricks-preprocessor.log

View File

@@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email 'github-actions@github.com'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
@@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC

View File

@@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email 'github-actions@github.com'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
@@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC

View File

@@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email 'github-actions@github.com'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
@@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC

View File

@@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email 'github-actions@github.com'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
@@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC

View File

@@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email 'github-actions@github.com'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
@@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC

View File

@@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email 'github-actions@github.com'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
@@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC

View File

@@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email 'github-actions@github.com'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
@@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC

View File

@@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email 'github-actions@github.com'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
@@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC

View File

@@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email 'github-actions@github.com'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
@@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC

View File

@@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email 'github-actions@github.com'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
@@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC

View File

@@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email 'github-actions@github.com'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
@@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC

View File

@@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email 'github-actions@github.com'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
@@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC

View File

@@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email 'github-actions@github.com'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
@@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC

View File

@@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email 'github-actions@github.com'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
@@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC

View File

@@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email 'github-actions@github.com'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
@@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC

View File

@@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email 'github-actions@github.com'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
@@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC

View File

@@ -82,4 +82,3 @@ az rest --method PUT \
{{#include ../../../banners/hacktricks-training.md}}

View File

@@ -43,7 +43,7 @@ gcloud source repos get-iam-policy <repo_name>
gcloud source repos clone <REPO NAME>
gcloud source repos get-iam-policy <REPO NAME>
... git add & git commit -m ...
git push --set-upstream origin master
git push --set-upstream origin $BRANCH
git push -u origin master
# Access via git