Skip to content

Commit b1fe2be

Browse files
committed
refactor conditionals in VRT workflow
1 parent 1f47b6c commit b1fe2be

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/vrt.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ env:
1515

1616
jobs:
1717
vrt-init:
18-
if: ${{ github.event.label.name == 'vrt:chrome-ready' || github.event.label.name == 'vrt:mobile-ready' || github.event.label.name == 'vrt:full-ready'}}
18+
if: startsWith(github.event.label.name, 'vrt:')
1919
runs-on: ubuntu-latest
2020

2121
steps:
@@ -36,7 +36,7 @@ jobs:
3636
cache: 'npm'
3737

3838
vrt-desktop:
39-
if: ${{ github.event.label.name == 'vrt:full-ready' || github.event.label.name == 'vrt:chrome-ready'}}
39+
if: contains(fromJSON('["vrt:full-ready", "vrt:chrome-ready"]'), github.event.label.name)
4040
needs: vrt-init
4141
runs-on: ubuntu-latest
4242

@@ -68,7 +68,7 @@ jobs:
6868
NODE_OPTIONS: --openssl-legacy-provider # per https://candid.technology/error-error-0308010c-digital-envelope-routines-unsupported/
6969

7070
vrt-legacy:
71-
if: ${{ github.event.label.name == 'vrt:full-ready'}}
71+
if: contains(fromJSON('["vrt:full-ready"]'), github.event.label.name)
7272
needs: vrt-init
7373
runs-on: ubuntu-latest
7474

@@ -101,7 +101,7 @@ jobs:
101101
NODE_OPTIONS: --openssl-legacy-provider # per https://candid.technology/error-error-0308010c-digital-envelope-routines-unsupported/
102102

103103
vrt-mobile:
104-
if: ${{ github.event.label.name == 'vrt:full-ready' || github.event.label.name == 'vrt:mobile-ready'}}
104+
if: contains(fromJSON('["vrt:full-ready", "vrt:mobile-ready"]'), github.event.label.name)
105105
needs: vrt-init
106106
runs-on: ubuntu-latest
107107

@@ -135,7 +135,7 @@ jobs:
135135

136136
vrt-wrap:
137137
needs: [vrt-desktop, vrt-legacy, vrt-mobile]
138-
if: always() && !cancelled() && !contains(needs.*.result, 'failure')
138+
if: startsWith(github.event.label.name, 'vrt:') && always() && !cancelled() && !contains(needs.*.result, 'failure')
139139
runs-on: ubuntu-latest
140140
env:
141141
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}

0 commit comments

Comments
 (0)