Skip to content

Commit

Permalink
Upload regenerated yarn.lock on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
lzm0 committed Mar 12, 2024
1 parent 1f80851 commit a69201e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions yarn/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,17 @@ runs:
if: ${{ failure() && steps.install-dependencies.conclusion == 'failure' }}
shell: bash
env:
CI: 0
run: yarn install
YARN_CHECKSUM_BEHAVIOR: update
run: |
yarn install
(
echo '# Bad `yarn.lock`'
echo 'This could be caused by bad locally cached packages.'
echo 'Try running: [`yarn cache clean --all`](https://yarnpkg.com/cli/cache/clean#options)'
) >> "$GITHUB_STEP_SUMMARY"
working-directory: ${{ inputs.working-directory }}

- name: Upload yarn.lock on failure
- name: Upload regenerated yarn.lock on failure
if: ${{ failure() && steps.install-dependencies.conclusion == 'failure' }}
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit a69201e

Please sign in to comment.