|
23 | 23 | with: |
24 | 24 | ref: ${{ github.event.pull_request.head.sha }} |
25 | 25 | persist-credentials: false |
26 | | - - name: Check .tx/config |
27 | | - id: check_files |
28 | | - uses: andstor/file-existence-action@v1 |
29 | | - with: |
30 | | - files: ".tx/config" |
31 | | - - name: Check .tx/deepin.conf |
32 | | - id: check_deepin |
33 | | - uses: andstor/file-existence-action@v1 |
34 | | - with: |
35 | | - files: ".tx/deepin.conf" |
36 | | - - name: Check translations config |
37 | | - if: steps.check_files.outputs.files_exists == 'true' && steps.check_deepin.outputs.files_exists == 'false' |
38 | | - run: | |
39 | | - echo "need .tx/deepin.conf, it likes: " |
40 | | - echo "--------------------------------" |
41 | | - echo "[transifex]" |
42 | | - echo "branch = m20" |
43 | | - echo "--------------------------------" |
44 | | - echo "Because we don't know the translation branch corresponding to this branch." |
45 | | - echo "If you don't know the corresponding translation branch, don't set branch value, we will use the default value." |
46 | | - exit 1 |
47 | | - - name: Init transifex file |
48 | | - if: steps.check_files.outputs.files_exists == 'true' |
49 | | - run: | |
50 | | - # TODO: not environment variable, action will override $HOME |
51 | | - mkdir -p /home/runner/work/_temp/_github_home/ |
52 | | - cat << EOF > /home/runner/work/_temp/_github_home/.transifexrc |
53 | | - [https://www.transifex.com] |
54 | | - rest_hostname = https://rest.api.transifex.com |
55 | | - api_hostname = https://api.transifex.com |
56 | | - hostname = https://www.transifex.com |
57 | | - token = ${{ env.TRANSIFEX_API_TOKEN }} |
58 | | - EOF |
59 | | - - name: Check translations update |
60 | | - if: steps.check_files.outputs.files_exists == 'true' |
61 | | - uses: justforlxz/deepin-builder-docker/translate@master |
62 | | - - name: Check git files |
63 | | - if: steps.check_files.outputs.files_exists == 'true' |
64 | | - shell: bash |
65 | | - run: | |
66 | | - lines=$(git status -s | wc -l | awk '{print $1}') |
67 | | - git status -s |
68 | | - if [[ x"$lines" != x0 ]]; then |
69 | | - exit 2 |
70 | | - fi |
71 | 26 | - name: get changelog version |
72 | 27 | id: get-version |
73 | 28 | run: | |
|
0 commit comments