forked from HumanSignal/label-studio
-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (30 loc) · 1.05 KB
/
sync_to_release.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
name: 'Scheduled sync to release branch'
on:
# Allow manual syncing/testing.
workflow_dispatch:
# Every Monday at 0600 UTC.
schedule:
- cron: '0 6 * * 1'
jobs:
dispatch:
runs-on: ubuntu-latest
steps:
- name: Check out release branch
uses: actions/checkout@v3
with:
# uses the `khan-actions-bot` Khan Org level user which was granted
# permissions to override branch protections.
token: ${{ secrets.KHAN_ACTIONS_BOT_TOKEN }}
ref: release
- name: Merge develop into release
run: |
git config --global user.name 'khan-actions-bot'
git config --global user.email '[email protected]'
git fetch --all --unshallow
git merge origin/develop --no-edit -m 'Merge develop into release branch in run id ${{github.run_id}}'
git push
- name: Notify Slack on failure
if: failure()
uses: ./.github/actions/notify_slack
with:
webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}