[backport] Use new backport action (#126542)

This commit is contained in:
Søren Louv-Jansen 2022-03-03 13:36:50 +01:00 committed by GitHub
parent efcdbb66dd
commit 8b994478cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 46 deletions

View file

@ -1,27 +0,0 @@
on:
pull_request_target:
branches:
- main
types:
- labeled
- closed
jobs:
backport:
name: Backport PR
runs-on: ubuntu-latest
if: |
github.event.pull_request.merged == true
&& contains(github.event.pull_request.labels.*.name, 'auto-backport-next')
&& (
(github.event.action == 'labeled' && github.event.label.name == 'auto-backport-next')
|| (github.event.action == 'closed')
)
steps:
- name: Backport Action
uses: sqren/backport-github-action@v7.3.1
with:
github_token: ${{secrets.KIBANAMACHINE_TOKEN}}
- name: Backport log
run: cat /home/runner/.backport/backport.log

View file

@ -9,6 +9,7 @@ on:
jobs:
backport:
name: Backport PR
runs-on: ubuntu-latest
if: |
github.event.pull_request.merged == true
&& contains(github.event.pull_request.labels.*.name, 'auto-backport')
@ -16,26 +17,11 @@ jobs:
(github.event.action == 'labeled' && github.event.label.name == 'auto-backport')
|| (github.event.action == 'closed')
)
runs-on: ubuntu-latest
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: Fix Version Label Gaps
uses: ./actions/fix-version-gaps
- name: Backport Action
uses: sqren/backport-github-action@v7.4.0
with:
github_token: ${{secrets.KIBANAMACHINE_TOKEN}}
- name: Run Backport
uses: ./actions/backport
with:
github_token: ${{secrets.KIBANAMACHINE_TOKEN}}
commit_user: kibanamachine
commit_email: 42973632+kibanamachine@users.noreply.github.com
- name: Backport log
run: cat ~/.backport/backport.log