File tree 1 file changed +13
-16
lines changed
.github/actions/yarn-install
1 file changed +13
-16
lines changed Original file line number Diff line number Diff line change 1
- name : yarn-install
1
+ name : Yarn
2
+ description : Runs `yarn install`
3
+ inputs :
4
+ immutable :
5
+ description : Abort with an error exit code if the lockfile was to be modified
6
+ default : true
2
7
runs :
3
8
using : composite
4
9
steps :
5
- - name : Install dependencies
10
+ - name : Install npm dependencies
11
+ if : ${{ inputs.immutable == 'true' }}
12
+ run : yarn
13
+ shell : bash
14
+ - name : Install npm dependencies (ignore lockfile changes)
15
+ if : ${{ inputs.immutable != 'true' }}
16
+ run : yarn --no-immutable
6
17
shell : bash
7
- run : |
8
- MAX_ATTEMPTS=2
9
- ATTEMPT=0
10
- WAIT_TIME=20
11
- while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do
12
- yarn install --non-interactive --frozen-lockfile && break
13
- echo "yarn install failed. Retrying in $WAIT_TIME seconds..."
14
- sleep $WAIT_TIME
15
- ATTEMPT=$((ATTEMPT + 1))
16
- done
17
- if [ $ATTEMPT -eq $MAX_ATTEMPTS ]; then
18
- echo "All attempts to invoke yarn install failed - Aborting the workflow"
19
- exit 1
20
- fi
You can’t perform that action at this time.
0 commit comments