-
Notifications
You must be signed in to change notification settings - Fork 5k
[Github Action] Add backport workflow
#24576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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}} | ||
| commit_user: kibanamachine | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a Github user for beats similar to kibanamachine? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, they should use something other than |
||
| 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%' | ||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.