feat: optimize actions

This commit is contained in:
源文雨
2023-09-21 23:47:31 +09:00
parent f33f18cb0a
commit 0f34027cca
3 changed files with 22 additions and 29 deletions

View File

@@ -6,11 +6,9 @@ on:
- dev
jobs:
genlocale:
name: genlocale
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@master
- uses: actions/checkout@master
- name: Run locale generation
run: |
@@ -20,15 +18,22 @@ jobs:
- name: Commit back
if: ${{ !github.head_ref }}
id: commitback
continue-on-error: true
run: |
git config --local user.name 'github-actions[bot]'
git config --local user.email 'github-actions[bot]@users.noreply.github.com'
git add --all
git commit -m "🎨 同步 locale"
git commit -m "chore(i18n): sync locale"
- name: Create Pull Request
if: ${{ !github.head_ref }}
if: steps.commitback.outcome == 'success'
continue-on-error: true
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
delete-branch: true
body: "Automatically sync i18n translation jsons"
title: "chore(i18n): sync locale"
commit-message: "chore(i18n): sync locale"
branch: genlocale-${{github.ref_name}}
branch-suffix: short-commit-hash