mirror of
https://github.com/tiennm99/ccs.git
synced 2026-08-20 22:23:36 +00:00
ci(workflow): add auto-sync dev after main release
Automatically merges main into dev after Release workflow completes. Keeps dev ahead with next version number after stable releases.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
name: Sync Dev After Main Release
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Release"]
|
||||
types: [completed]
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
sync-dev:
|
||||
# Only run if Release workflow succeeded on main branch
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.PAT_TOKEN }}
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Sync dev with main
|
||||
run: |
|
||||
git fetch origin main dev
|
||||
git checkout dev
|
||||
git merge origin/main --no-edit -m "chore(sync): merge main into dev after release [skip ci]"
|
||||
git push origin dev
|
||||
Reference in New Issue
Block a user