-
Notifications
You must be signed in to change notification settings - Fork 85
53 lines (45 loc) · 1.26 KB
/
sync_branch.yaml
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
name: sync main with dev
on:
push:
branches:
- main
pull_request:
defaults:
run:
shell: bash -x -e -u -o pipefail {0}
jobs:
sync-branches-via-rebase:
runs-on: ubuntu-latest
name: syncing main with dev
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ko3n1g/dev
- name: Attempt rebase
run: |
git fetch origin main
git rebase origin/main
git push --force
notify:
runs-on: ubuntu-latest
if: failure()
needs: [sync-branches-via-rebase]
env:
RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
SLACK_WEBHOOK_ADMIN: "<!subteam^${{ secrets.SLACK_WEBHOOK_ADMIN }}>"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: NVIDIA/NeMo-FW-CI-templates
ref: v0.5.0
path: send-slack-alert
- name: Send Slack alert
uses: ./send-slack-alert/.github/actions/send-slack-alert
with:
message: >
<${{ env.RUN_URL }}|sync main with dev> has failed for.
cc: ${{ env.SLACK_WEBHOOK_ADMIN }}
webhook: ${{ env.SLACK_WEBHOOK }}