|
| 1 | +name: 'Coverage upload' |
| 2 | +on: |
| 3 | + workflow_run: |
| 4 | + workflows: ["CI"] |
| 5 | + types: [completed] |
| 6 | + |
| 7 | +jobs: |
| 8 | + fetch-info: |
| 9 | + name: Fetch triggering workflow metadata |
| 10 | + runs-on: ubuntu-latest |
| 11 | + permissions: |
| 12 | + contents: read |
| 13 | + checks: write # For the check run creation ! |
| 14 | + steps: |
| 15 | + - name: 'Check run ○' |
| 16 | + uses: yoanm/tmp-reports-group-workspace/.github/actions/attach-check-run-to-triggering-workflow-action@develop |
| 17 | + with: |
| 18 | + name: 'Fetch coverage info' |
| 19 | + fails-on-triggering-workflow-failure: true |
| 20 | + |
| 21 | + - uses: yoanm/tmp-reports-group-workspace/.github/actions/fetch-workflow-metadata-action@develop |
| 22 | + id: fetch-workflow-metadata |
| 23 | + |
| 24 | + outputs: |
| 25 | + commit-sha: ${{ steps.fetch-workflow-metadata.outputs.commit-sha }} |
| 26 | + run-id: ${{ steps.fetch-workflow-metadata.outputs.run-id }} |
| 27 | + |
| 28 | + codacy-uploader: |
| 29 | + name: Codacy |
| 30 | + needs: [fetch-info] |
| 31 | + uses: yoanm/tmp-reports-group-workspace/.github/workflows/codacy-upload-from-artifacts.yml@develop |
| 32 | + permissions: |
| 33 | + contents: read |
| 34 | + checks: write # For the check run creation ! |
| 35 | + secrets: |
| 36 | + PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} |
| 37 | + with: |
| 38 | + artifacts-pattern: coverage-groups-* |
| 39 | + run-id: ${{ needs.fetch-info.outputs.run-id }} |
| 40 | + override-commit: ${{ needs.fetch-info.outputs.commit-sha }} |
| 41 | + |
| 42 | + codecov-uploader: |
| 43 | + name: Codecov |
| 44 | + needs: [fetch-info] |
| 45 | + uses: yoanm/tmp-reports-group-workspace/.github/workflows/codecov-upload-from-artifacts.yml@develop |
| 46 | + permissions: |
| 47 | + contents: read |
| 48 | + checks: write # For the check run creation ! |
| 49 | + secrets: |
| 50 | + TOKEN: ${{ secrets.CODECOV_TOKEN }} |
| 51 | + with: |
| 52 | + artifacts-pattern: coverage-groups-* |
| 53 | + run-id: ${{ needs.fetch-info.outputs.run-id }} |
| 54 | + override-commit: ${{ needs.fetch-info.outputs.commit-sha }} |
| 55 | + override-branch: ${{ needs.fetch-info.outputs.branch }} |
| 56 | + override-pr: ${{ needs.fetch-info.outputs.pr-number }} |
| 57 | + override-build: ${{ needs.fetch-info.outputs.run-id }} |
| 58 | + override-build-url: ${{ needs.fetch-info.outputs.run-url }} |
0 commit comments