Skip to content

lang&zs-2.7.2-1/20 #172

lang&zs-2.7.2-1/20

lang&zs-2.7.2-1/20 #172

name: Lang And Zs To Paratranz
on:
issues:
types: [ opened ]
env:
PARATRANZ_TOKEN: ${{ secrets.PARATRANZ_TOKEN }}
PARATRANZ_PROJECT_ID: ${{ secrets.PARATRANZ_PROJECT_ID }}
GIT_AUTHOR: MuXiu1997 <[email protected]>
jobs:
check-and-parse-issue:
if: contains(github.event.issue.labels.*.name, '自动化:lang+zs→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: 自动化:lang+zs→paratranz
VALID_USER: ${{ github.repository_owner }}
run: |
poetry run python main.py parse-issue lang-and-zs-to-paratranz
outputs:
passed: ${{ steps.check-and-parse-issue.outputs.passed }}
modpack-url: ${{ steps.check-and-parse-issue.outputs.modpack-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
uses: peter-evans/[email protected]
with:
comment: |
此模板仅由内部人员使用,已自动关闭。
lang-and-zs-to-paratranz:
name: Lang And Zs 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: Ensure .temp
run: mkdir -p .temp
- name: Ensure Modpack
id: ensure--modpack
uses: ./.github/actions/ensure-modpack
with:
dir: .temp
url: ${{ needs.check-and-parse-issue.outputs.modpack-url }}
name: modpack
- name: Run Script
run: >-
poetry run python main.py action lang-and-zs-to-paratranz
--modpack-path='.temp/modpack'
- name: Close Issue
uses: peter-evans/[email protected]
with:
comment: |
已自动同步至 Paratranz。