mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 10:57:55 +01:00
use bot for tests
This commit is contained in:
parent
a18843e281
commit
3cfe2264e8
2 changed files with 200 additions and 14 deletions
18
.github/workflows/bot_run_tests.yml
vendored
18
.github/workflows/bot_run_tests.yml
vendored
|
|
@ -3,10 +3,10 @@ on: issue_comment
|
|||
|
||||
jobs:
|
||||
pr_commented:
|
||||
name: Run Tests for PR
|
||||
name: Check Permissions
|
||||
if: >
|
||||
github.event.issue.pull_request &&
|
||||
contains(github.event.issue.bodyText, '/run tests')
|
||||
contains(github.event.comment.body, '/run tests')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check association
|
||||
|
|
@ -14,9 +14,21 @@ jobs:
|
|||
allowed=("OWNER" "COLLABORATOR")
|
||||
value="\<${{ github.event.issue.author_association }}\>"
|
||||
|
||||
if [[ ${array[@]} =~ $value ]]
|
||||
if [[ ${allowed[@]} =~ $value ]]
|
||||
then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run-tests:
|
||||
name: Run Tests
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
statuses: write
|
||||
needs:
|
||||
- pr_commented
|
||||
uses: ./.github/workflows/build-and-test.yml
|
||||
with:
|
||||
pr: ${{ github.event.issue.number }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue