-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
43 lines (35 loc) · 1.65 KB
/
sync-canary-to-main.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
41
42
43
name: Sync Canary to Main
on:
# triggered manually in Github
workflow_dispatch:
# triggered by the type "sync-canary-to-main" (e.g. from release action after publishing)
repository_dispatch:
types: [sync-canary-to-main]
jobs:
create_pull_request:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensure all history is fetched
- name: Create Pull Request
uses: repo-sync/pull-request@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_branch: "canary"
destination_branch: "main"
pr_title: "Auto-sync Canary to Main"
pr_body: |
## Automated: Sync from Canary to Main
This Pull Request is automatically generated to sync the changes from the Canary branch to the Main branch. Below are the included updates:
### Triggered by a Direct Push to Canary:
- Please check the recent commits on the Canary branch directly as this sync may include multiple changes.
### Triggered by a Pull Request Merge:
- Merged Pull Request: [PR#${{ github.event.pull_request.number }}](${{ github.event.pull_request.html_url }}) - ${{ github.event.pull_request.title }}
- PR Description: ${{ github.event.pull_request.body }}
- Merged by: ${{ github.event.pull_request.merged_by.login }}
### Action Required:
- Please review the changes carefully.
- Approve and merge the Pull Request if everything is in order.
Thank you for maintaining the Main branch updated and clean.