only record main builds

This commit is contained in:
burnettk 2022-11-21 22:11:35 -05:00
parent 54ae3104e9
commit 284aff3dd9
1 changed files with 2 additions and 1 deletions

View File

@ -94,7 +94,8 @@ jobs:
browser: chrome browser: chrome
# only record on push, not pull_request, since we do not have secrets for PRs, # only record on push, not pull_request, since we do not have secrets for PRs,
# so the required CYPRESS_RECORD_KEY will not be available. # so the required CYPRESS_RECORD_KEY will not be available.
record: ${{ github.event_name == 'push' }} # we have limited runs in cypress cloud, so only record main builds
record: ${{ github.ref_name == 'main' && github.event_name == 'push' }}
env: env:
# pass the Dashboard record key as an environment variable # pass the Dashboard record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}