diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 5e2bdadd7..e4b14874e 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,4 @@ -name: Build benchmark images +name: Check on PR on: pull_request: @@ -61,3 +61,29 @@ jobs: run: | docker load --input ./image.tar docker run --rm benchmark:latest /bin/bash -c "cd ${{ steps.read-metadata.outputs.location }}; ${{ steps.read-metadata.outputs.buildCommand }}" + + check-all-test-pass-on-pr: + runs-on: ubuntu-latest + + permissions: + pull-requests: write + + needs: + - build-test + + if: always() + + steps: + - run: exit 1 + if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} + + - uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: ':mega: All tests passed!' + }) \ No newline at end of file