Skip to content

Commit

Permalink
Troubleshoot
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts committed Apr 10, 2024
1 parent ea9aa6c commit 82d2a79
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@ runs:
run: |
# Triggers and conditions
sonar_cmd="mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar"
sonar_cmd="mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar" >> $GITHUB_OUTPUT
# if [ "${{ inputs.java-cache }}" == "maven" ]; then
sonar_cmd="mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar" >> $GITHUB_OUTPUT
# sonar_cmd="mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar" >> $GITHUB_OUTPUT
# elif [ "${{ inputs.java-cache }}" == "gradle" ]; then
# sonar_cmd="./gradlew build sonarqube --info" >> $GITHUB_OUTPUT
# else
Expand Down Expand Up @@ -129,13 +132,13 @@ runs:
echo "Triggers not matched, testing skipped"
echo "triggered=false" >> $GITHUB_OUTPUT
# Setup Java and cache dir
- uses: actions/setup-java@v4
with:
cache: ${{ inputs.java-cache }}
distribution: ${{ inputs.java-distribution }}
java-version: ${{ inputs.java-version }}
server-id: 'github'
# # Setup Java and cache dir
# - uses: actions/setup-java@v4
# with:
# cache: ${{ inputs.java-cache }}
# distribution: ${{ inputs.java-distribution }}
# java-version: ${{ inputs.java-version }}
# server-id: 'github'

# # Run tests, hopefully generating coverage for SonarCloud
# - name: Run Tests
Expand All @@ -154,6 +157,12 @@ runs:
shell: bash
run: |
# Run SonarCloud for ${{ inputs.java-cache }}
echo "steps.vars.outputs.triggered=${{ steps.vars.outputs.triggered }}"
echo "steps.vars.outputs.sonar_cmd=${{ steps.vars.outputs.sonar_cmd }}"
echo "json: ${{ toJson(steps.vars.outputs) }}"
# This is where things like to go wrong
cd ${{ inputs.dir }}
${{ steps.vars.outputs.sonar_cmd }} \
-Dsonar.host.url=https://sonarcloud.io ${{ inputs.sonar_args }}
Expand Down

0 comments on commit 82d2a79

Please sign in to comment.