Skip to content

Commit

Permalink
Check-license fix solution files require restore (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeReaper authored Oct 17, 2024
1 parent 456f8ec commit 3c3a12c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions actions/dotnet-check-license/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ runs:
- name: Add ignore argument
shell: bash
if: inputs.license-ignore-file
run: echo "ARGUMENTS=--ignored-packages ${{ inputs.license-ignore-file }} ${{ env.ARGUMENTS }}" | tee -a $GITHUB_ENV
run: |
echo "ARGUMENTS=--ignored-packages ${{ inputs.license-ignore-file }} ${{ env.ARGUMENTS }}" | tee -a $GITHUB_ENV
echo '### Ignored NuGet packages:' >> $GITHUB_STEP_SUMMARY
jq -r '.[]' < '${{ inputs.license-ignore-file }}' | xargs -I {} echo '- {}' >> $GITHUB_STEP_SUMMARY
- name: Auto-correct project argument
shell: bash
Expand All @@ -81,4 +85,6 @@ runs:
- name: Run license check
shell: bash
run: ~/.dotnet/tools/nuget-license --input ${{ env.PROJECT }} --allowed-license-types ${{ inputs.allowed-licenses-file }} ${{ env.ARGUMENTS }}
run: |
dotnet restore ${{ env.PROJECT }}
~/.dotnet/tools/nuget-license --input ${{ env.PROJECT }} --allowed-license-types ${{ inputs.allowed-licenses-file }} ${{ env.ARGUMENTS }}

0 comments on commit 3c3a12c

Please sign in to comment.