Add a github action for skipping failed tests via comment (#122088)

This commit is contained in:
Brian Seeders 2021-12-28 12:34:49 -05:00 committed by GitHub
parent add93740db
commit a0e750de97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

44
.github/workflows/skip-failed-test.yml vendored Normal file
View file

@ -0,0 +1,44 @@
on:
issue_comment:
types:
- created
jobs:
issue_commented:
name: Skip failed test on comment
if: |
!github.event.issue.pull_request
&& startsWith(github.event.comment.body, '/skip')
&& contains(github.event.issue.labels.*.name, 'failed-test')
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: User Permission Check
uses: ./actions/permission-check
with:
permission: admin
- name: Checkout kibana-operations
uses: actions/checkout@v2
with:
repository: 'elastic/kibana-operations'
ref: main
path: ./kibana-operations
token: ${{secrets.KIBANAMACHINE_TOKEN}}
- name: Install Actions
working-directory: ./kibana-operations/triage
env:
GITHUB_TOKEN: ${{secrets.KIBANAMACHINE_TOKEN}}
run: |
npm install
node failed-test-auto ${{github.event.issue.number}}