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 1515 merge_success : ${{ steps.merge.outputs.merge_success }}
1616
1717 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+
1827 - name : Checkout repository
1928 uses : actions/checkout@v4
2029 with :
2635 git config --global user.name "github-actions[bot]"
2736 git config --global user.email "github-actions[bot]@users.noreply.github.com"
2837
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-
4438 - name : Check for changes between dev and main
4539 id : check_changes
4640 run : |
You can’t perform that action at this time.
0 commit comments