ci: fix TPU skip if (#17672)

This commit is contained in:
Jirka Borovec 2023-06-01 19:03:55 +02:00 committed by GitHub
parent 1307b605e8
commit e314d3a772
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -5,6 +5,7 @@ on:
branches: [master, "release/*"]
pull_request_target:
branches: [master, "release/*"]
types: [ opened, reopened, edited, ready_for_review, synchronize ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
@ -25,8 +26,11 @@ env:
jobs:
test-on-tpus:
runs-on: ubuntu-22.04
# run only when the PR title contains '[TPU]' or is a merge to master
if: ${{ startsWith(github.event_name, 'pull_request') && contains(github.event.pull_request.title, '[TPU]') || (github.event_name == 'push' && github.ref == 'refs/heads/master') }}
# run only when the PR title contains 'TPU' or is a merge to master
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
(startsWith(github.event_name, 'pull_request') && ( contains(github.event.pull_request.title, 'TPU'))
strategy:
fail-fast: false
matrix: