Skip to content

Commit a899b7c

Browse files
authored
fix(gha): Allow pnpm to update the lockfile after package updates (#318)
### Description The pnpm upgrade job has been failing as in ci environments pnpm is by default not allowed to update the lockfile, but that is explicitly what we want to do here. ### Checklist - [ ] I have updated the PR title to match [CDKTN's style guide](https://github.com/open-constructs/cdk-terrain/blob/main/CONTRIBUTING.md#pull-requests-1) - [ ] I have run the linter on my code locally - [ ] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the [documentation](https://github.com/open-constructs/cdk-terrain-docs/tree/main/content) if applicable - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works if applicable - [ ] New and existing unit tests pass locally with my changes <!-- If this is still a work in progress, feel free to open a draft PR until you're able to check off all the items on the list above -->
1 parent 1317141 commit a899b7c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/pnpm-upgrade.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
5959
# Refresh the lockfile after the ncu edits above (necessary for "pnpm update" to run)
6060
- name: Run "pnpm install"
61-
run: pnpm install --prefer-offline
61+
run: pnpm install --prefer-offline --no-frozen-lockfile
6262

6363
# Next, create and upload the changes as a patch file. This will later be downloaded to create a pull request
6464
# Creating a pull request requires write permissions and it's best to keep write privileges isolated.
@@ -182,7 +182,7 @@ jobs:
182182
pnpm exec nx exec -p '${{ join(matrix.pr.packages, ',') }}' -- ncu --upgrade --reject='@types/node,@types/fs-extra,constructs,typescript,graphology-types,jsii,jsii-pacmak,jsii-rosetta,jsii-docgen,codemaker,${{ steps.list-packages.outputs.list }}' --target=minor
183183
# Refresh the lockfile after the ncu edits above (necessary for "pnpm update" to run)
184184
- name: Run "pnpm install"
185-
run: pnpm install --prefer-offline
185+
run: pnpm install --prefer-offline --no-frozen-lockfile
186186

187187
- name: Set git identity
188188
run: |-
@@ -247,7 +247,7 @@ jobs:
247247
pnpm exec nx exec -- ncu --upgrade --filter='jsii,jsii-pacmak,jsii-rosetta,jsii-docgen,codemaker,constructs' --target=minor
248248
# Refresh the lockfile after the ncu edits above (necessary for "pnpm update" to run)
249249
- name: Run "pnpm install"
250-
run: pnpm install --prefer-offline
250+
run: pnpm install --prefer-offline --no-frozen-lockfile
251251

252252
- name: Set git identity
253253
run: |-

0 commit comments

Comments
 (0)