mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
chore(ci): add workflow to sync dev branch to main on release
This commit is contained in:
parent
70f4f63524
commit
42eaf9f3b5
1 changed files with 26 additions and 0 deletions
26
.github/workflows/sync-main-on-release.yml
vendored
Normal file
26
.github/workflows/sync-main-on-release.yml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
name: Sync branch
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
branches: [dev]
|
||||
|
||||
jobs:
|
||||
force-push-main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Force push dev to main
|
||||
run: |
|
||||
git fetch origin
|
||||
git checkout dev
|
||||
git push origin dev:main --force
|
Loading…
Add table
Add a link
Reference in a new issue