Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
on:
pull_request_target:
branches:
- master
types:
- labeled
- closed

jobs:
backport:
name: Backport PR
if: |
github.event.pull_request.merged == true
&& contains(github.event.pull_request.labels.*.name, 'auto-backport')
&& (
(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: Run Backport
uses: ./actions/backport
with:
github_token: ${{secrets.BACKPORT_ACTION_TOKEN}}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This secret can be added via Github repos settings.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is one of the reasons we do not want to use actions, the management of secrets.

commit_user: kibanamachine
Copy link
Copy Markdown
Author

@sorenlouv sorenlouv Mar 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a Github user for beats similar to kibanamachine?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, they should use something other than kibanamachine, probably elasticmachine or their jenkins-beats-ci bot?

commit_email: beats-backport-action@users.noreply.github.com
auto_merge: 'true'
auto_merge_method: 'squash'
manual_backport_command_template: 'node scripts/backport --pr %pullNumber%'