mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-17 06:17:09 +00:00
Automatically merges main into dev after Release workflow completes. Keeps dev ahead with next version number after stable releases.
36 lines
960 B
YAML
36 lines
960 B
YAML
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
|