forked from geekan/HowToLiveLonger
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some wrong translation and add a CI (Still Coding)
- Loading branch information
Showing
2 changed files
with
70 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Auto-Translate | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
paths: | ||
- 'README.md' | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- 'main' | ||
paths: | ||
- "README.md" | ||
|
||
jobs: | ||
translate: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
|
||
- name: Upload translation | ||
uses: actions/[email protected] | ||
with: | ||
name: temp_trans_file | ||
path: temp-translation.md | ||
|
||
push-and-PR: | ||
if: ${{ github.event.pull_request.merged == true || github.event_name == 'push' }} | ||
needs: translate | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
with: | ||
ref: auto-translation | ||
|
||
- name: Download translation | ||
uses: actions/[email protected] | ||
with: | ||
name: temp_trans_file | ||
|
||
- name: Commit translation to review branch | ||
shell: sh | ||
run: | | ||
git add temp-translation.md | ||
git commit -m "Auto translation for new lines" | ||
git push origin auto-translation | ||
- name: Open PR and request reviews | ||
uses: repo-sync/pull-request@master | ||
with: | ||
source_branch: "auto-translation" | ||
destination_branch: "main" | ||
pr_title: "Auto Translation" | ||
pr_body: "*Automated PR, submitting translation.*" | ||
pr_reviewer: "qhy040404,geekan" | ||
github_token: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters