Skip to content

Commit ac9e4da

Browse files
quinnjnickrobinson251
authored andcommitted
Add nightly rebase of branches with upstream julia (#42)
* Add nightly rebase of branches with upstream julia * Update .github/workflows/nightly-rebase-upstream.yml Co-authored-by: Nick Robinson <[email protected]> * Update .github/workflows/nightly-rebase-upstream.yml Co-authored-by: Nick Robinson <[email protected]> * Update .github/workflows/nightly-rebase-upstream.yml Co-authored-by: Nick Robinson <[email protected]> * Updates --------- Co-authored-by: Nick Robinson <[email protected]>
1 parent 70ec2ea commit ac9e4da

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Every night, rebase the Julia branches on top of raicode `master`.
2+
name: NightlyRebaseUpstream
3+
on:
4+
schedule:
5+
# every night at 11 PM, raicode nightly rebase runs at midnight
6+
- cron: 0 23 * * *
7+
workflow_dispatch:
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
jobs:
12+
NightlyRebaseUpstream:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false # run all jobs in the matrix even if one fails
16+
matrix:
17+
julia_branch:
18+
- { name: "backports-release-1.9+RAI", upstream: "backports-release-1.9", comp_pr: "https://github.com/RelationalAI/julia/pull/45"}
19+
- { name: "backports-release-1.10+RAI", upstream: "backports-release-1.10", comp_pr: "https://github.com/RelationalAI/julia/pull/46"}
20+
- { name: "master+RAI", upstream: "master", comp_pr: "https://github.com/RelationalAI/julia/pull/47"}
21+
steps:
22+
- name: Checkout the repo and our branch
23+
uses: actions/checkout@v3
24+
with:
25+
ref: ${{ matrix.julia_branch.name }}
26+
# Needed to make rebasing work (https://github.com/actions/checkout/issues/372)
27+
fetch-depth: 0
28+
- name: Attempt the rebase
29+
id: attempt_the_rebase
30+
run: |
31+
git config --global user.email "[email protected]"
32+
git config --global user.name "RAI CI (GitHub Action Automation)"
33+
34+
git remote add upstream https://github.com/JuliaLang/julia
35+
git fetch --quiet upstream ${{ matrix.julia_branch.upstream }}}
36+
git rebase upstream/${{ matrix.julia_branch.upstream }}
37+
continue-on-error: true
38+
- name: On rebase success, push
39+
if: steps.attempt_the_rebase.outcome == 'success'
40+
run: |
41+
git push --force origin ${{ matrix.julia_branch.name }} # force-push, because of the rebase.
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
- name: On rebase failure, checkout jira-incident action
45+
if: steps.attempt_the_rebase.outcome != 'success'
46+
id: checkout-jira-indicent-action
47+
uses: actions/checkout@v3
48+
with:
49+
repository: RelationalAI/raicloud-deployment
50+
ssh-key: ${{ secrets.DELVECI_SSH }}
51+
path: deployment-repo
52+
- name: On rebase failure, create Jira incident
53+
if: steps.attempt_the_rebase.outcome != 'success'
54+
id: create-jira-indicent
55+
uses: ./deployment-repo/.github/actions/create-jira-incident
56+
with:
57+
affected_service: Engineering - Julia Upgrades - Medium Priority Only
58+
summary: "Nightly rebase failed for RelationalAI/julia branch `${{ matrix.julia_branch.name }}`"
59+
description: "Failed to rebase RelationalAI/julia branch `${{ matrix.julia_branch.name }}` branch on top of `${{ matrix.julia_branch.upstream}}`.\nPlease manually rebase ${{ matrix.julia_branch.name }}\nSee current diff between upstream branch here: ${{ matrix.julia_branch.comp_pr }}"
60+
user_email: ${{ secrets.JIRA_API_USER_EMAIL }}
61+
jira_api_token: ${{ secrets.JIRA_API_TOKEN }}
62+
priority: "Medium"

0 commit comments

Comments
 (0)