Skip to content

Commit

Permalink
Try pseudo-ternary for fetch-depth
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts committed Aug 12, 2023
1 parent 68059a5 commit ca508f6
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,9 @@ runs:
steps:
# Shallow clone is faster, but SonarCloud requires a full clone
- uses: actions/checkout@v3
if: (! inputs.sonar_project_token)
with:
repository: ${{ inputs.repository }}

# Shallow clone is faster, but can't be used with SonarCloud
- uses: actions/checkout@v3
if: inputs.sonar_project_token
with:
# Disable shallow clone for SonarCloud analysis
fetch-depth: 0
fetch-depth: ${{ inputs.sonar_project_token && 0 || 1 }}
repository: ${{ inputs.repository }}

# Process variables and inputs
Expand Down

0 comments on commit ca508f6

Please # to comment.