mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
[CI] Use custom github action for backport (#91523)
This commit is contained in:
parent
2fe0d05375
commit
95e6d13590
1 changed files with 14 additions and 28 deletions
42
.github/workflows/backport.yml
vendored
42
.github/workflows/backport.yml
vendored
|
@ -18,34 +18,20 @@ jobs:
|
|||
)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Get backport config'
|
||||
run: |
|
||||
curl 'https://raw.githubusercontent.com/elastic/kibana/master/.backportrc.json' > .backportrc.json
|
||||
|
||||
- name: Use Node.js 14.x
|
||||
uses: actions/setup-node@v1
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
node-version: 14.x
|
||||
repository: 'elastic/kibana-github-actions'
|
||||
ref: main
|
||||
path: ./actions
|
||||
|
||||
- name: Install backport CLI
|
||||
run: npm install -g backport@5.6.4
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
|
||||
- name: Backport PR
|
||||
run: |
|
||||
git config --global user.name "kibanamachine"
|
||||
git config --global user.email "42973632+kibanamachine@users.noreply.github.com"
|
||||
backport --fork true --username kibanamachine --accessToken "${{ secrets.KIBANAMACHINE_TOKEN }}" --ci --pr "$PR_NUMBER" --labels backport --assignee "$PR_OWNER" | tee 'output.log'
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
PR_OWNER: ${{ github.event.pull_request.user.login }}
|
||||
|
||||
- name: Report backport status
|
||||
run: |
|
||||
COMMENT="Backport result
|
||||
\`\`\`
|
||||
$(cat output.log)
|
||||
\`\`\`"
|
||||
|
||||
GITHUB_TOKEN="${{ secrets.KIBANAMACHINE_TOKEN }}" gh api -X POST repos/elastic/kibana/issues/$PR_NUMBER/comments -F body="$COMMENT"
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
- name: Run Backport
|
||||
uses: ./actions/backport
|
||||
with:
|
||||
branch: master
|
||||
github_token: ${{secrets.KIBANAMACHINE_TOKEN}}
|
||||
commit_user: kibanamachine
|
||||
commit_email: 42973632+kibanamachine@users.noreply.github.com
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue