Skip to content

Commit c225075

Browse files
committed
change env.CLEAR_LOCK_FILES into inputs.clearLockFiles
1 parent 880ff90 commit c225075

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/tests.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@ on:
66
- master
77
pull_request:
88
workflow_dispatch:
9-
10-
env:
11-
CLEAR_LOCK_FILES: false
9+
inputs:
10+
clearLockFiles:
11+
description: 'Clear yarn.lock files?'
12+
required: true
13+
default: 'no'
14+
type: choice
15+
options:
16+
- yes
17+
- no
1218

1319
jobs:
1420
tests:
@@ -20,10 +26,6 @@ jobs:
2026
fail-fast: false
2127

2228
steps:
23-
- name: Check variables
24-
if: ${{ env.CLEAR_LOCK_FILES != 'true' && env.CLEAR_LOCK_FILES != 'false' }}
25-
run: echo "Variable CLEAR_LOCK_FILES is ${{ env.CLEAR_LOCK_FILES }}, but should be 'true' or 'false'" && exit 1
26-
2729
- uses: actions/checkout@v3
2830
- name: Set up Node.js ${{ matrix.node-version }}
2931
uses: actions/setup-node@v3
@@ -47,7 +49,7 @@ jobs:
4749
run: npm install -g yarn
4850

4951
- name: Clear lock files
50-
if: ${{ env.CLEAR_LOCK_FILES == 'true' }}
52+
if: ${{ inputs.clearLockFiles == 'yes' }}
5153
run: rm yarn.lock packages/*/yarn.lock
5254

5355
- name: Install dependencies

0 commit comments

Comments
 (0)