mirror of
https://github.com/ceph/ceph
synced 2025-02-23 19:17:37 +00:00
Merge pull request #46830 from ceph/backport-doc-pr
.github: Automatically backport doc/releases PRs
This commit is contained in:
commit
8db6d89196
9
.github/labeler.yml
vendored
9
.github/labeler.yml
vendored
@ -1,6 +1,15 @@
|
||||
api-change:
|
||||
- src/pybind/mgr/dashboard/openapi.yaml
|
||||
|
||||
backport quincy:
|
||||
- doc/releases/**
|
||||
|
||||
backport pacific:
|
||||
- doc/releases/**
|
||||
|
||||
backport octopus:
|
||||
- doc/releases/**
|
||||
|
||||
build/ops:
|
||||
- "**/CMakeLists.txt"
|
||||
- admin/**
|
||||
|
26
.github/workflows/backport.yml
vendored
Normal file
26
.github/workflows/backport.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
name: Automatically backport labeled PRs
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- closed
|
||||
- labeled
|
||||
|
||||
jobs:
|
||||
backport:
|
||||
name: Backport
|
||||
runs-on: ubuntu-latest
|
||||
# Only react to merged PRs for security reasons.
|
||||
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
|
||||
if: >
|
||||
github.event.pull_request.merged
|
||||
&& (
|
||||
github.event.action == 'closed'
|
||||
|| (
|
||||
github.event.action == 'labeled'
|
||||
&& contains(github.event.label.name, 'backport')
|
||||
)
|
||||
)
|
||||
steps:
|
||||
- uses: tibdex/backport@v2
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
21
.github/workflows/label-releases-doc-prs.yml
vendored
Normal file
21
.github/workflows/label-releases-doc-prs.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
name: "Label doc/releases PRs so our backport GitHub Action picks them up"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'doc/releases/**'
|
||||
|
||||
jobs:
|
||||
if_merged:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Assign labels based on modified files
|
||||
uses: actions/labeler@9794b1493b6f1fa7b006c5f8635a19c76c98be95
|
||||
with:
|
||||
sync-labels: ''
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
Loading…
Reference in New Issue
Block a user