Skip to content

Commit

Permalink
change env.CLEAR_LOCK_FILES into inputs.clearLockFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrHeinz committed Mar 7, 2024
1 parent 880ff90 commit c225075
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ on:
- master
pull_request:
workflow_dispatch:

env:
CLEAR_LOCK_FILES: false
inputs:
clearLockFiles:
description: 'Clear yarn.lock files?'
required: true
default: 'no'
type: choice
options:
- yes
- no

jobs:
tests:
Expand All @@ -20,10 +26,6 @@ jobs:
fail-fast: false

steps:
- name: Check variables
if: ${{ env.CLEAR_LOCK_FILES != 'true' && env.CLEAR_LOCK_FILES != 'false' }}
run: echo "Variable CLEAR_LOCK_FILES is ${{ env.CLEAR_LOCK_FILES }}, but should be 'true' or 'false'" && exit 1

- uses: actions/checkout@v3
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand All @@ -47,7 +49,7 @@ jobs:
run: npm install -g yarn

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

- name: Install dependencies
Expand Down

0 comments on commit c225075

Please sign in to comment.