-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add pipeline for syncing beta with main
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Sync beta with main | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- closed | ||
|
||
jobs: | ||
sync-beta-with-main: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Create pull request to beta | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
# Check if a pull request already exists from main to beta | ||
if gh pr list --head main --base beta | grep -q "main -> beta"; then | ||
echo "PR already exists!" | ||
else | ||
gh pr create \ | ||
--base beta \ | ||
--head main \ | ||
--title "Sync beta with main" \ | ||
--body "Automatically created pull request to merge changes from main into development." | ||
fi |