Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/nightly-rebase-upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Every night, rebase the Julia branches on top of raicode `master`.
name: NightlyRebaseUpstream
on:
schedule:
# every night at 11 PM, raicode nightly rebase runs at midnight
- cron: 0 23 * * *
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
NightlyRebaseUpstream:
runs-on: ubuntu-latest
strategy:
fail-fast: false # run all jobs in the matrix even if one fails
matrix:
julia_branch:
- { name: "backports-release-1.9+RAI", upstream: "backports-release-1.9", comp_pr: "https://github.com/RelationalAI/julia/pull/45"}
- { name: "backports-release-1.10+RAI", upstream: "backports-release-1.10", comp_pr: "https://github.com/RelationalAI/julia/pull/46"}
- { name: "master+RAI", upstream: "master", comp_pr: "https://github.com/RelationalAI/julia/pull/47"}
steps:
- name: Checkout the repo and our branch
uses: actions/checkout@v3
with:
ref: ${{ matrix.julia_branch.name }}
# Needed to make rebasing work (https://github.com/actions/checkout/issues/372)
fetch-depth: 0
- name: Attempt the rebase
id: attempt_the_rebase
run: |
git config --global user.email "[email protected]"
git config --global user.name "RAI CI (GitHub Action Automation)"

git remote add upstream https://github.com/JuliaLang/julia
git fetch --quiet upstream ${{ matrix.julia_branch.upstream }}}
git rebase upstream/${{ matrix.julia_branch.upstream }}
continue-on-error: true
- name: On rebase success, push
if: steps.attempt_the_rebase.outcome == 'success'
run: |
git push --force origin ${{ matrix.julia_branch.name }} # force-push, because of the rebase.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: On rebase failure, checkout jira-incident action
if: steps.attempt_the_rebase.outcome != 'success'
id: checkout-jira-indicent-action
uses: actions/checkout@v3
with:
repository: RelationalAI/raicloud-deployment
ssh-key: ${{ secrets.DELVECI_SSH }}
path: deployment-repo
- name: On rebase failure, create Jira incident
if: steps.attempt_the_rebase.outcome != 'success'
id: create-jira-indicent
uses: ./deployment-repo/.github/actions/create-jira-incident
with:
affected_service: Engineering - Julia Upgrades - Medium Priority Only
summary: "Nightly rebase failed for RelationalAI/julia branch `${{ matrix.julia_branch.name }}`"
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 }}"
user_email: ${{ secrets.JIRA_API_USER_EMAIL }}
jira_api_token: ${{ secrets.JIRA_API_TOKEN }}
priority: "Medium"