@@ -31,14 +31,19 @@ jobs:
31
31
contents : write
32
32
pull-requests : write
33
33
steps :
34
- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
34
+ - name : Checkout repo
35
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
35
36
with :
36
37
fetch-depth : 0
37
- - run : |
38
+
39
+ - name : Config Git
40
+ run : |
38
41
git config --local user.email svc-api-experience-integrations-escalation@mongodb.com
39
42
git config --local user.name svc-apix-bot
40
43
41
- - run : |
44
+ - name : Rebase branch with master
45
+ id : rebase-check
46
+ run : |
42
47
echo "Updating branch: ${{ matrix.branch }}"
43
48
44
49
if ! git ls-remote --heads origin ${{ matrix.branch }} | grep -q ${{ matrix.branch }}; then
@@ -70,23 +75,27 @@ jobs:
70
75
fi
71
76
fi
72
77
73
- - uses : peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
78
+ - name : Create pull request
79
+ uses : peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
80
+ if : steps.rebase-check.outputs.has-changes == 'true'
74
81
with :
75
82
token : ${{ secrets.APIX_BOT_PAT }}
76
83
title : " chore: Update ${{ matrix.branch }} from master"
77
84
commit-message : " Update ${{ matrix.branch }} from master"
78
85
delete-branch : true
79
86
branch : update-${{ matrix.branch }}-from-master
80
87
base : ${{ matrix.branch }}
81
- body : " Automated update of ${{ matrix.branch }} branch with latest changes from master branch."
88
+ body : " Automated update of `${{ matrix.branch }}` branch with latest changes from master branch."
89
+ labels : " skip-docs-notification"
82
90
83
91
slack-notification :
84
92
needs : update-branches
85
93
if : ${{ !cancelled() && needs.update-branches.result == 'failure' }}
86
94
runs-on : ubuntu-latest
87
95
permissions : {}
88
96
steps :
89
- - uses : slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52
97
+ - name : Send Slack notification on failure
98
+ uses : slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52
90
99
with :
91
100
webhook : ${{ secrets.SLACK_WEBHOOK_URL }}
92
101
webhook-type : incoming-webhook
0 commit comments