Skip to content

Commit

Permalink
Use a GitHub app for syncing rocm-main and upstream main
Browse files Browse the repository at this point in the history
  • Loading branch information
charleshofer committed Feb 6, 2025
1 parent 0962b96 commit 7ec6e39
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/rocm-nightly-upstream-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,18 @@ jobs:
sync-main:
runs-on: ubuntu-latest
steps:
- run: |
- name: Generate an app token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.ROCM_REPO_MANAGEMENT_API_2_ID }}
private-key: ${{ secrets.ROCM_REPO_MANAGEMENT_API_2_PRIV_KEY }}
- name: Sync our main with upstream main
run: |
gh auth status
gh repo sync rocm/jax -b main
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
create-sync-branch:
needs: sync-main
runs-on: ubuntu-latest
Expand All @@ -44,9 +51,16 @@ jobs:
needs: create-sync-branch
runs-on: ubuntu-latest
steps:
- run: |
- name: Generate an app token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.ROCM_REPO_MANAGEMENT_API_2_ID }}
private-key: ${{ secrets.ROCM_REPO_MANAGEMENT_API_2_PRIV_KEY }}
- name: Open a PR to rocm-main
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"
gh pr merge --repo $GITHUB_REPOSITORY --merge --auto $SYNC_BRANCH_NAME
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.generate-token.outputs.token }}

0 comments on commit 7ec6e39

Please sign in to comment.