Skip to content

ROCm Nightly Upstream Sync #18

ROCm Nightly Upstream Sync

ROCm Nightly Upstream Sync #18

# Pulls the latest changes from upstream into main and opens a PR to merge
# them into rocm-main.
name: ROCm Nightly Upstream Sync
on:
workflow_dispatch:
schedule:
- cron: '0 6 * * 1-5'
env:
SYNC_BRANCH_NAME: ci-upstream-sync-${{ github.run_number }}_${{ github.run_attempt }}
jobs:
sync-main:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- run: gh repo sync rocm/jax -b main
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
create-sync-branch:
needs: sync-main
permissions:
contents: write
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Create branch
run: |
git fetch
git checkout origin/main
git checkout -b $SYNC_BRANCH_NAME
git push origin HEAD
open-sync-pr:
needs: create-sync-branch
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- run: |
gh pr create --repo $GITHUB_REPOSITORY --head $SYNC_BRANCH_NAME --base rocm-main --title "CI: $(date +%x) upstream sync" --body "Daily sync with upstream"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}