mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[CI] Add opt-in on-merge action that automatically assigns version labels (#134101)
This commit is contained in:
parent
47ec76937a
commit
8b12549c3f
2 changed files with 52 additions and 0 deletions
6
.github/workflows/fix-version-gaps.yml
vendored
6
.github/workflows/fix-version-gaps.yml
vendored
|
@ -13,6 +13,12 @@ jobs:
|
|||
if: |
|
||||
github.event.pull_request.merged == true
|
||||
&& !contains(github.event.pull_request.labels.*.name, 'auto-backport')
|
||||
&& !(
|
||||
contains(github.event.pull_request.labels.*.name, 'backport:prev-minor')
|
||||
|| contains(github.event.pull_request.labels.*.name, 'backport:prev-major')
|
||||
|| contains(github.event.pull_request.labels.*.name, 'backport:all-open')
|
||||
|| contains(github.event.pull_request.labels.*.name, 'backport:auto-version')
|
||||
)
|
||||
&& !(
|
||||
(github.event.action == 'labeled' && github.event.label.name == 'auto-backport')
|
||||
|| (github.event.action == 'closed')
|
||||
|
|
46
.github/workflows/on-merge.yml
vendored
Normal file
46
.github/workflows/on-merge.yml
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
on:
|
||||
pull_request_target:
|
||||
branches:
|
||||
- main
|
||||
types:
|
||||
- closed
|
||||
- labeled
|
||||
|
||||
jobs:
|
||||
on-merge:
|
||||
name: 'Label and Backport'
|
||||
runs-on: ubuntu-latest
|
||||
if: |
|
||||
github.event.pull_request.merged == true
|
||||
&& (
|
||||
contains(github.event.pull_request.labels.*.name, 'backport:prev-minor')
|
||||
|| contains(github.event.pull_request.labels.*.name, 'backport:prev-major')
|
||||
|| contains(github.event.pull_request.labels.*.name, 'backport:all-open')
|
||||
|| contains(github.event.pull_request.labels.*.name, 'backport:auto-version')
|
||||
)
|
||||
&& (
|
||||
(
|
||||
github.event.action == 'labeled' && (
|
||||
github.event.label.name == 'backport:prev-minor'
|
||||
|| github.event.label.name == 'backport:prev-major'
|
||||
|| github.event.label.name == 'backport:all-open'
|
||||
|| github.event.label.name == 'backport:auto-version'
|
||||
)
|
||||
)
|
||||
|| (github.event.action == 'closed')
|
||||
)
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'elastic/kibana-github-actions'
|
||||
ref: main
|
||||
path: ./actions
|
||||
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
|
||||
- name: Run On-Merge
|
||||
uses: ./actions/on-merge
|
||||
with:
|
||||
github_token: ${{secrets.KIBANAMACHINE_TOKEN}}
|
Loading…
Add table
Add a link
Reference in a new issue