Files
rocm-systems/.github/workflows/import_pr_list.yml
T
2025-08-18 12:50:03 -07:00

69 行
2.2 KiB
YAML
原始文件 Blame 歷史記錄

此檔案包含易混淆的 Unicode 字元
此檔案包含可能與其他字元混淆的 Unicode 字元。如果您認為這是有意的,可以安全地忽略此警告。使用 Escape 鍵來顯示它們。
name: Import Subrepo PRs
on:
workflow_dispatch:
inputs:
subrepo-prefix:
description: "Superrepo path prefix (e.g., projects/rocblas)"
required: true
subrepo-pr-numbers:
description: "Commaseparated list of Subrepo PR numbers to import"
required: true
subrepo-repo:
description: "Full name of subrepo repo or fork (e.g., ROCm/rocBLAS or user/rocBLAS-fork)"
required: true
subrepo-upstream:
description: "Canonical subrepo repo (e.g., ROCm/rocBLAS)"
required: true
super-repo-target-branch:
description: "Target branch in the superrepo"
required: false
default: "develop"
jobs:
import-prs:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Generate GitHub App token
id: gen_token
uses: actions/create-github-app-token@v2.0.6
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Checkout superrepo
uses: actions/checkout@v4
with:
token: ${{ steps.gen_token.outputs.token }}
fetch-depth: 0
sparse-checkout: |
.github/scripts/import_subrepo_prs.py
${{ github.event.inputs.subrepo-prefix }}
sparse-checkout-cone-mode: true
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install PyGithub GitPython
- name: Import Subrepo PRs
env:
GITHUB_TOKEN: ${{ steps.gen_token.outputs.token }}
SUBPREFIX: ${{ github.event.inputs.subrepo-prefix }}
SUBREPO: ${{ github.event.inputs.subrepo-repo }}
UPSTREAM: ${{ github.event.inputs.subrepo-upstream }}
TARGET: ${{ github.event.inputs.super-repo-target-branch }}
PR_LIST: ${{ github.event.inputs.subrepo-pr-numbers }}
run: |
python .github/scripts/import_subrepo_prs.py