-
Notifications
You must be signed in to change notification settings - Fork 87
37 lines (32 loc) · 1.03 KB
/
tranalate-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Translate tests with deep prompt
on:
push:
branches:
- main
jobs:
check-and-translate:
name: Translate tests with DeepPrompt
runs-on: ubuntu-latest
if: github.event.review.state == 'approved'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Check if all checks passed
id: checks
uses: LouisBrunner/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.event.pull_request.head.sha }}
timeout: 300
- name: Run translation only if all checks are successful
if: steps.checks.outputs.conclusion == 'success'
run: |
echo "All checks passed. Starting translation."
cd eng/translation
yarn install
node translate.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
API_KEY: ${{ secrets.OPENAI_API_KEY }}
API_BASE: ${{ secrets.OPENAI_API_BASE }}
PR_ID: ${{ github.event.pull_request.number }}