Skip to content

Commit fb0f8da

Browse files
committed
ci: update next release
1 parent efe0248 commit fb0f8da

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

.github/workflows/prepare_dev_for_next_release.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,27 @@ jobs:
4747
git push origin main
4848
4949
sync-dev:
50-
name: Merge main into dev
50+
name: Sync dev with main
5151
runs-on: ubuntu-latest
5252
needs: update-pods
53+
if: ${{ always() && github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' && startsWith(github.event.workflow_run.head_commit.message, 'release:') }}
54+
5355
steps:
54-
- name: Checkout
56+
- name: Checkout dev
5557
uses: actions/checkout@v5.0.0
5658
with:
5759
token: ${{ secrets.GITHUB_TOKEN }}
5860
fetch-depth: 0
61+
ref: dev
5962

60-
- name: Fetch all branches
61-
run: git fetch --all
62-
63-
- name: Fast-forward dev with main
63+
- name: Reset dev to main
6464
run: |
65+
git config user.name "github-actions[bot]"
66+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
67+
68+
git fetch origin main dev
69+
6570
git checkout dev
66-
git merge origin/main --ff-only
67-
git push origin dev
71+
git reset --hard origin/main
72+
73+
git push --force-with-lease origin dev

0 commit comments

Comments
 (0)