forked from remsky/Kokoro-FastAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.61 KB
/
sync-develop.yml
File metadata and controls
55 lines (46 loc) · 1.61 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# name: Sync develop with master
# on:
# push:
# branches:
# - master
# jobs:
# sync-develop:
# runs-on: ubuntu-latest
# permissions:
# contents: write
# issues: write
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# ref: develop
# - name: Configure Git
# run: |
# git config user.name "GitHub Actions"
# git config user.email "actions@github.com"
# - name: Merge master into develop
# run: |
# git fetch origin master:master
# git merge --no-ff origin/master -m "chore: Merge master into develop branch"
# - name: Push changes
# run: |
# if ! git push origin develop; then
# echo "Failed to push to develop branch"
# exit 1
# fi
# - name: Handle Failure
# if: failure()
# uses: actions/github-script@v7
# with:
# script: |
# const issueBody = `Automatic merge from master to develop failed.
# Please resolve this manually
# Workflow run: ${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`;
# await github.rest.issues.create({
# owner: context.repo.owner,
# repo: context.repo.repo,
# title: '🔄 Automatic master to develop merge failed',
# body: issueBody,
# labels: ['merge-failed', 'automation']
# });