-
-
Notifications
You must be signed in to change notification settings - Fork 69
34 lines (27 loc) · 727 Bytes
/
sync-dev.yml
File metadata and controls
34 lines (27 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Sync dev after squash merge
on:
pull_request:
types:
- closed
branches:
- main
jobs:
sync:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- 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 (HARD RESET)
run: |
git fetch origin
git checkout dev
git reset --hard origin/main
- name: Push new cleaned dev
run: git push origin dev --force