CI: Setup pushing-translation procedure in CI.

This commit is contained in:
Terry Geng
2020-10-31 20:30:05 +08:00
parent 716b106f6c
commit 5c5120e3d7
3 changed files with 82 additions and 5 deletions

View File

@ -17,6 +17,23 @@ steps:
- push
- tag
- name: push-translation
image: debian
environment:
TRADUORA_R_CLIENT:
from_secret: TRADUORA_R_CLIENT
TRADUORA_R_SECRET:
from_secret: TRADUORA_R_SECRET
TRADUORA_W_CLIENT:
from_secret: TRADUORA_W_CLIENT
TRADUORA_W_SECRET:
from_secret: TRADUORA_W_SECRET
GITHUB_API:
from_secret: GITHUB_API
commands:
- apt update && apt install -y git python3-requests hub
- SOURCE_DIR=$(pwd) ./scripts/update_translation_to_server.sh
- name: translate-html
image: python:3
commands:
@ -126,7 +143,7 @@ steps:
from_secret: GITHUB_API
commands:
- apt update && apt install -y git python3-requests hub
- SOURCE_DIR=$(pwd) ./scripts/commit_new_translation.sh
- PUSH=1 SOURCE_DIR=$(pwd) ./scripts/commit_new_translation.sh
node:
location: external