-
Notifications
You must be signed in to change notification settings - Fork 5
40 lines (34 loc) · 1.14 KB
/
rebase-content.yml
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
name: Rebase content branch
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
ref: content
- name: git rebase
run: |
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
git fetch origin master
git rebase origin/master
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: content
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
- name: Send Slack notification if rebase failed
if: failure()
uses: rtCamp/action-slack-notify@master
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_FE_ALERTS_WEB_HOOK }}
SLACK_COLOR: '#8B0000'
SLACK_ICON: 'https://avatars0.githubusercontent.com/u/20046234'
SLACK_MESSAGE: 'Git rebase of content branch in next repo failed. Please investigate and fix it.'
SLACK_TITLE: Rebase failed
SLACK_USERNAME: 'oa-bot'