CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
95 lines
3.3 KiB
YAML
95 lines
3.3 KiB
YAML
# This contains the workflow definitions that allow users to test backports
|
|
# to the release branch using comments on issues.
|
|
#
|
|
# /cherry-pick <commit> <...>
|
|
#
|
|
# This comment will attempt to cherry-pick the given commits to the latest
|
|
# release branch (release/Y.x) and if successful, push the result to a branch
|
|
# on github.
|
|
#
|
|
# /branch <owner>/<repo>/<branch>
|
|
#
|
|
# This comment will create a pull request from <branch> to the latest release
|
|
# branch.
|
|
|
|
name: Issue Release Workflow
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
issue_comment:
|
|
types:
|
|
- created
|
|
- edited
|
|
issues:
|
|
types:
|
|
- opened
|
|
|
|
|
|
jobs:
|
|
backport-commits-validate-input:
|
|
runs-on: ubuntu-24.04
|
|
if: >-
|
|
(github.repository == 'llvm/llvm-project') &&
|
|
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
|
|
contains(github.event.action == 'opened' && github.event.issue.body || github.event.comment.body, '/cherry-pick')
|
|
outputs:
|
|
comment-body: ${{ steps.validate.outputs.comment-body }}
|
|
steps:
|
|
- name: Validate Input Comment
|
|
id: validate
|
|
env:
|
|
COMMENT_BODY: ${{ github.event.action == 'opened' && github.event.issue.body || github.event.comment.body }}
|
|
run: |
|
|
# This will strip out everything from the comment except for the /cherry-pick commands.
|
|
# If there are multiple /cherry-pick commands they will all be included in the output.
|
|
# This is fine since the github-automation.py script can handle multiple cherry-pick commands.
|
|
validated_comment=$(\
|
|
grep -o -e '/cherry-pick \(https://github.com/llvm/llvm-project/commit/\)\?[a-f0-9 ]\+' <<< $COMMENT_BODY \
|
|
)
|
|
echo "Validated Comment is:"
|
|
echo ${validated_comment}
|
|
|
|
echo comment-body=${validated_comment} >> $GITHUB_OUTPUT
|
|
|
|
backport-commits:
|
|
name: Backport Commits
|
|
runs-on: ubuntu-24.04
|
|
environment: main-branch-only
|
|
needs:
|
|
- backport-commits-validate-input
|
|
permissions:
|
|
issues: write
|
|
pull-requests: write
|
|
steps:
|
|
- name: Fetch LLVM sources
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
repository: llvm/llvm-project
|
|
# GitHub stores the token used for checkout and uses it for pushes
|
|
# too, but we want to use a different token for pushing, so we need
|
|
# to disable persist-credentials here.
|
|
persist-credentials: false
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Environment
|
|
run: |
|
|
pip install --require-hashes -r ./llvm/utils/git/requirements.txt
|
|
./llvm/utils/git/github-automation.py --token ${{ github.token }} setup-llvmbot-git
|
|
|
|
- name: Backport Commits
|
|
env:
|
|
COMMENT_BODY: ${{ needs.backport-commits-validate-input.outputs.comment-body }}
|
|
REQUESTED_BY: ${{ (github.event.action == 'opened' && github.event.issue.user.login) || github.event.comment.user.login }}
|
|
run: |
|
|
printf "%s" "$COMMENT_BODY" |
|
|
./llvm/utils/git/github-automation.py \
|
|
--repo "$GITHUB_REPOSITORY" \
|
|
--token "${{ secrets.RELEASE_WORKFLOW_PR_CREATE }}" \
|
|
release-workflow \
|
|
--branch-repo-token ${{ secrets.RELEASE_WORKFLOW_PUSH_SECRET }} \
|
|
--issue-number ${{ github.event.issue.number }} \
|
|
--requested-by "$REQUESTED_BY" \
|
|
auto
|