Skip to content

Commit

Permalink
Add pull_request_review_comment trigger to run GitHub Actions Tests (#…
Browse files Browse the repository at this point in the history
…436)

To trigger the GitHub Actions called Tests just create a new comment
on the review with the text:

`github-actions-workflow: tests`
  • Loading branch information
nycholas committed Jan 20, 2024
1 parent 5d9dabb commit 819fb92
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,39 @@ on:
- release/**
tags-ignore:
- v**
issue_comment:
types: [created]

permissions:
actions: write
contents: read

jobs:
does-it-run:
name: Does it run?
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform:
- ubuntu-latest
steps:
- name: Check comment review
if: >-
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
!contains(github.event.issue.body, 'github-actions-workflow: tests')
uses: action-pack/cancel@v1
- name: Comment about start of workflow
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_ID: ${{ github.event.pull_request.html_url }}
run: |
gh pr comment $PR_ID --body 'The "Tests [Docker]" workflow will be started.'
unit-tests:
name: Unit tests
needs: does-it-run
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
Expand All @@ -29,6 +55,7 @@ jobs:
integration-tests:
name: Integration tests
needs: does-it-run
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
Expand Down

0 comments on commit 819fb92

Please sign in to comment.