diff --git a/.github/workflows/automerge_to_future.yml b/.github/workflows/automerge_to_future.yml new file mode 100644 index 000000000..ea831a5dd --- /dev/null +++ b/.github/workflows/automerge_to_future.yml @@ -0,0 +1,18 @@ +name: Create PR to merge release branch into the main branch +# At the end of a release cycle and the start of a new one, we may want to automatically forward all changes to the current branch (main) to the branch for the next release (future). +# This workflow can be disabled earlier in the release cycle in the GitHub UI as described in https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/disabling-and-enabling-a-workflow +on: + schedule: + - cron: '0 9 * * *' + workflow_dispatch: +jobs: + create_merge_pr: + name: Create PR to merge main branch into future branch + uses: swiftlang/github-workflows/.github/workflows/create_automerge_pr.yml@main + with: + base_branch: future + head_branch: main + permissions: + contents: write + pull-requests: write + if: (github.event_name == 'schedule' && github.repository == 'swiftlang/swift-foundation') || (github.event_name != 'schedule') # Ensure that we don't run this on a schedule in a fork