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 74c4d89 commit 1f80851
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions yarn/action.yml
Expand Up @@ -195,10 +195,26 @@ runs:
working-directory: ${{ inputs.working-directory }}

- name: Install Dependencies
id: install-dependencies
run: yarn install
shell: bash
working-directory: ${{ inputs.working-directory }}

- name: Regenerate yarn.lock on failure
if: ${{ failure() && steps.install-dependencies.conclusion == 'failure' }}
shell: bash
env:
CI: 0
run: yarn install
working-directory: ${{ inputs.working-directory }}

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

- name: Build
run: ${{ inputs.yarn-build-command }}
shell: bash
Expand Down

0 comments on commit 1f80851

Please sign in to comment.