Skip to content

Commit d72bf59

Browse files
committed
Add GitHub action that automatically creates a PR to merge main into a release branch
In the first period after branching the release branch, we want to include many changes from `main` also in the release branch. This workflow automatically creates a PR every Monday to merge main into the release branch. Later in the release cycle we should stop this practice to avoid landing risky changes by disabling this workflow. Similar to swiftlang/swift-format#986
1 parent 7ba88aa commit d72bf59

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 all changes from `main` also 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)