This repository has been archived by the owner on Mar 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (65 loc) · 2.42 KB
/
5-gt-lang-to-paratranz.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: GT Lang To ParaTranz
on:
issues:
types: [ opened ]
env:
PARATRANZ_TOKEN: ${{ secrets.PARATRANZ_TOKEN }}
PARATRANZ_PROJECT_ID: ${{ secrets.PARATRANZ_PROJECT_ID }}
TARGET_LANG: pt_BR
jobs:
check-and-parse-issue:
if: contains(github.event.issue.labels.*.name, 'Automação:gt-lang→paratranz')
name: Check And Parse Issue
runs-on: ubuntu-latest
steps:
- name: Checkout MuXiu1997/GTNH-translation-compare
uses: actions/checkout@v3
with:
repository: MuXiu1997/GTNH-translation-compare
ref: main
- name: Ensure Dependencies
uses: ./.github/actions/ensure-dependencies
- name: Run Script
id: check-and-parse-issue
env:
GITHUB_ISSUE: ${{ toJSON(github.event.issue) }}
VALID_LABEL: Automação:gt-lang→paratranz
VALID_USER: ${{ github.repository_owner }}
run: |
poetry run python main.py parse-issue gt-lang-to-paratranz
outputs:
passed: ${{ steps.check-and-parse-issue.outputs.passed }}
gt-lang-url: ${{ steps.check-and-parse-issue.outputs.gt-lang-url }}
close-issue:
name: Close Issue
needs: check-and-parse-issue
if: ${{ needs.check-and-parse-issue.outputs.passed != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Close Issue
run: gh issue close "${ISSUE_URL}" --comment "Este template foi fechado, pois deve somente ser usado para uso interno."
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_URL: ${{ github.event.issue.html_url }}
gt-lang-to-paratranz:
name: GT Lang To ParaTranz
needs: check-and-parse-issue
if: ${{ needs.check-and-parse-issue.outputs.passed == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout MuXiu1997/GTNH-translation-compare
uses: actions/checkout@v3
with:
repository: MuXiu1997/GTNH-translation-compare
ref: main
- name: Ensure Dependencies
uses: ./.github/actions/ensure-dependencies
- name: Run Script
run: >-
poetry run python main.py action gt-lang-to-paratranz
--gt-lang-url='${{ needs.check-and-parse-issue.outputs.gt-lang-url }}'
- name: Close Issue
run: gh issue close "${ISSUE_URL}" --comment "Sincronizado automaticamente para o ParaTranz."
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_URL: ${{ github.event.issue.html_url }}