Skip to content

Commit

Permalink
Create on-merge.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
brianseeders authored Jul 14, 2022
1 parent bbb1021 commit 9893ff5
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/on-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
on:
pull_request_target:
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, 'auto-backport')
&& (
(
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}}

0 comments on commit 9893ff5

Please sign in to comment.