-
Notifications
You must be signed in to change notification settings - Fork 62
36 lines (34 loc) · 1.15 KB
/
auto-tdesign-mobile-vue-pr.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
name: Auto tdesign-mobile-vue PR
on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened, closed]
paths:
- "packages/products/tdesign-mobile-vue/**"
jobs:
auto-push:
runs-on: ubuntu-latest
if: >
github.event_name == 'pull_request' &&
github.event.pull_request.merged == false
steps:
- run: echo "Clone tdesign-mobile-vue"
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: Tencent/tdesign-mobile-vue
token: ${{ secrets.PERSONAL_TOKEN }}
path: target-repo
- name: Get current time
run: |
echo "NOW=$(date +'%Y-%m-%d-%H_%M_%S')" >> $GITHUB_ENV
- run: |
cp -rf packages/products/tdesign-mobile-vue/* target-repo/
cd target-repo/
git status
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git checkout -b feat/API-modify-${{ env.NOW }}
git add .
git commit -m "feat: modify API"
git push --set-upstream origin feat/API-modify-${{ env.NOW }}