-
Notifications
You must be signed in to change notification settings - Fork 9
40 lines (33 loc) · 1.26 KB
/
sync-open-source.yaml
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
name: Sync open-source
on:
pull_request:
paths:
- "web/apps/web/**"
- "web/packages/**"
- ".github/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get last commit author email
id: get_email
run: echo "COMMIT_AUTHOR_EMAIL=$(git log -n 1 --pretty=format:%ae)" >> $GITHUB_ENV
- name: Test author email
run: echo "The commit author email is $COMMIT_AUTHOR_EMAIL"
- uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: web
target-directory: web
destination-github-username: "myshell-ai"
destination-repository-name: "open-source"
target-branch: ${{ github.head_ref }}
create-target-branch-if-needed: true
user-name: ${{ github.event.pull_request.user.login }}
user-email: ${{ env.COMMIT_AUTHOR_EMAIL }}
# https://github.com/orgs/community/discussions/25191
commit-message: See ${{github.repository}}@${{ github.event.pull_request.head.sha }}
- name: Test get variable exported by push-to-another-repository
run: echo $DESTINATION_CLONED_DIRECTORY