File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change 15
15
merge_success : ${{ steps.merge.outputs.merge_success }}
16
16
17
17
steps :
18
+ - name : Check if dev branch exists
19
+ run : |
20
+ if git ls-remote --heads https://github.com/${{ github.repository }}.git | grep -q "refs/heads/dev"; then
21
+ echo "::notice::Dev branch exists, proceeding with sync"
22
+ else
23
+ echo "::notice::Dev branch does not exist, skipping sync"
24
+ exit 1
25
+ fi
26
+
18
27
- name : Checkout repository
19
28
uses : actions/checkout@v4
20
29
with :
26
35
git config --global user.name "github-actions[bot]"
27
36
git config --global user.email "github-actions[bot]@users.noreply.github.com"
28
37
29
- - name : Check if dev branch exists
30
- id : check_dev
31
- run : |
32
- if git show-ref --verify --quiet refs/remotes/origin/dev; then
33
- echo "dev_exists=true" >> $GITHUB_OUTPUT
34
- else
35
- echo "dev_exists=false" >> $GITHUB_OUTPUT
36
- fi
37
-
38
- - name : Exit if dev branch doesn't exist
39
- if : steps.check_dev.outputs.dev_exists == 'false'
40
- run : |
41
- echo "Dev branch does not exist. Skipping sync."
42
- exit 0
43
-
44
38
- name : Check for changes between dev and main
45
39
id : check_changes
46
40
run : |
You can’t perform that action at this time.
0 commit comments