Update translate_es.yml
This commit is contained in:
parent
5575dd5683
commit
aa82be05c0
15
.github/workflows/translate_es.yml
vendored
15
.github/workflows/translate_es.yml
vendored
@ -34,15 +34,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip3 install openai tqdm
|
pip3 install openai tqdm
|
||||||
|
|
||||||
- name: Update & install wget & translator.py
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install wget -y
|
|
||||||
mkdir scripts
|
|
||||||
cd scripts
|
|
||||||
wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Download language branch #Make sure we have last version
|
- name: Download language branch #Make sure we have last version
|
||||||
run: |
|
run: |
|
||||||
@ -53,15 +44,15 @@ jobs:
|
|||||||
git checkout master
|
git checkout master
|
||||||
|
|
||||||
- name: Run translation script on changed files
|
- name: Run translation script on changed files
|
||||||
run: |
|
run: |
|
||||||
echo "Starting translations"
|
echo "Starting translations"
|
||||||
echo "Commit: 0afe4e4475ddd0e31b7b8957df1e0e9bb275b731"
|
echo "Commit: $GITHUB_SHA"
|
||||||
|
|
||||||
# Export the OpenAI API key as an environment variable
|
# Export the OpenAI API key as an environment variable
|
||||||
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
||||||
|
|
||||||
# Run the translation script on each changed file
|
# Run the translation script on each changed file
|
||||||
git diff-tree --no-commit-id --name-only -r "0afe4e4475ddd0e31b7b8957df1e0e9bb275b731" | grep -v "SUMMARY.md" | while read -r file; do
|
git diff-tree --no-commit-id --name-only -r "$GITHUB_SHA" | grep -v "SUMMARY.md" | while read -r file; do
|
||||||
if echo "$file" | grep -qE '\.md$'; then
|
if echo "$file" | grep -qE '\.md$'; then
|
||||||
echo -n "$file , " >> /tmp/file_paths.txt
|
echo -n "$file , " >> /tmp/file_paths.txt
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user