Skip to content

Commit afb9637

Browse files
committed
tests with weblate
1 parent 3f11d73 commit afb9637

File tree

2 files changed

+20
-22
lines changed

2 files changed

+20
-22
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,10 @@ jobs:
9999
- name: TODO - weblate
100100
shell: bash
101101
run: |
102-
echo "trigger pull"
103-
echo "trigger deepl"
104-
echo "trigger commit"
105-
echo "trigger push"
106-
# for lang in $OTHER_LANGS
107-
# do
108-
# bash trigger_weblate.sh ${{ secrets.WEBLATE_API_URL }} $lang ${{ secrets.WEBLATE_TOKEN }}
109-
# done
102+
for lang in $OTHER_LANGS
103+
do
104+
bash trigger_weblate.sh ${{ secrets.WEBLATE_API_URL }} $lang ${{ secrets.WEBLATE_TOKEN }}
105+
done
110106
111107
- name: build full docs
112108
run: |

trigger_weblate.sh

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
set -euxo pipefail
4+
35
api_token=$3
46
language=$2
57
url=$1
@@ -21,13 +23,13 @@ curl \
2123
-H "Authorization: Token $api_token" \
2224
"$url/projects/nitrokey-documentation/repository/"
2325

24-
curl \
25-
--data-binary '{
26-
"operation":"reset"
27-
}' \
28-
-H "Content-Type: application/json" \
29-
-H "Authorization: Token $api_token" \
30-
"$url/projects/nitrokey-documentation/repository/"
26+
#curl \
27+
# --data-binary '{
28+
# "operation":"reset"
29+
# }' \
30+
# -H "Content-Type: application/json" \
31+
# -H "Authorization: Token $api_token" \
32+
# "$url/projects/nitrokey-documentation/repository/"
3133

3234
for comp in $components
3335
do
@@ -53,13 +55,13 @@ curl \
5355
-H "Authorization: Token $api_token" \
5456
"$url/projects/nitrokey-documentation/repository/"
5557

56-
curl \
57-
--data-binary '{
58-
"operation":"push"
59-
}' \
60-
-H "Content-Type: application/json" \
61-
-H "Authorization: Token $api_token" \
62-
"$url/projects/nitrokey-documentation/repository/"
58+
#curl \
59+
# --data-binary '{
60+
# "operation":"push"
61+
# }' \
62+
# -H "Content-Type: application/json" \
63+
# -H "Authorization: Token $api_token" \
64+
# "$url/projects/nitrokey-documentation/repository/"
6365

6466

6567

0 commit comments

Comments
 (0)