Merge pull request #829 from scroll-tech/4844-blog #24
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
# when there's new bump version commit in dev branch (triggered by push in prod) | |
# merge prod branch back to dev branch with merge (not squash) | |
name: "Merge Prod Back to Dev" | |
on: | |
push: | |
branches: | |
- mainnet | |
jobs: | |
merge-back: | |
if: | | |
!endsWith(github.event.head_commit.message, ' [bot]') | |
name: "Merge prod back to dev" | |
permissions: | |
contents: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout source code" | |
uses: actions/checkout@v3 | |
with: | |
ref: sepolia | |
- run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "github-actions" | |
- run: | | |
git fetch --unshallow | |
git checkout sepolia | |
git merge --no-ff origin/mainnet -m "Auto-merge prod back to dev [bot]" | |
- name: Create Pull Request for dev | |
uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04 | |
with: | |
token: ${{ secrets.WRITE_TOKEN }} | |
delete-branch: true | |
branch: ci/_merge-prod-back-to-dev | |
title: "Auto-merge prod back to dev [bot]" | |
labels: "bot/merge-prod-back-to-dev, automerge, automerge-merge" | |
body: "" |