Skip to content

Commit cf4e08b

Browse files
authored
Merge pull request #3053 from ahoppen/auto-merge
Add GitHub action that automatically creates a PR to merge main into a release branch
2 parents 7ba88aa + d0c3e61 commit cf4e08b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/automerge.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Create PR to merge main into release branch
2+
# In the first period after branching the release branch, we typically want to include many changes from `main` in the release branch. This workflow automatically creates a PR every Monday to merge main into the release branch.
3+
# Later in the release cycle we should stop this practice to avoid landing risky changes by disabling this workflow. To do so, disable the workflow as described in https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/disabling-and-enabling-a-workflow
4+
on:
5+
schedule:
6+
- cron: '0 9 * * MON'
7+
workflow_dispatch:
8+
jobs:
9+
create_merge_pr:
10+
name: Create PR to merge main into release branch
11+
uses: swiftlang/github-workflows/.github/workflows/create_automerge_pr.yml@main
12+
with:
13+
base_branch: release/6.2
14+
if: (github.event_name == 'schedule' && github.repository == 'swiftlang/swift-syntax') || (github.event_name != 'schedule') # Ensure that we don't run this on a schedule in a fork

0 commit comments

Comments
 (0)