diff --git a/.github/workflows/ci-django-api.yml b/.github/workflows/ci-django-api.yml index 81beb1a..d230196 100644 --- a/.github/workflows/ci-django-api.yml +++ b/.github/workflows/ci-django-api.yml @@ -147,19 +147,23 @@ jobs: - name: Store coverage.xml uses: actions/cache/save@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 with: - path: coverage.xml + path: ${{ inputs.working-directory && format('{0}/', inputs.working-directory) || ''}}coverage.xml key: cache-${{ github.run_id }}-${{ github.run_attempt }} sonarcloud: name: Run SonarQube Cloud Scan runs-on: ubuntu-latest needs: tests + defaults: + run: + working-directory: ${{ inputs.working-directory }} + steps: - uses: actions/checkout@v4 - name: Restore coverage.xml uses: actions/cache/restore@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 with: - path: coverage.xml + path: ${{ inputs.working-directory && format('{0}/', inputs.working-directory) || ''}}coverage.xml key: cache-${{ github.run_id }}-${{ github.run_attempt }} fail-on-cache-miss: true # Without this workaround, SonarQube Cloud reports a warning about an incorrect source path