|
1 |
| -name: 'Coverage upload' |
| 1 | +name: 'Coverage' |
2 | 2 | on:
|
3 | 3 | workflow_run:
|
4 | 4 | workflows: ["CI"]
|
5 | 5 | types: [completed]
|
6 | 6 |
|
7 | 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/temp-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/temp-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/temp-reports-group-workspace/.github/workflows/codacy-upload-from-artifacts.yml@develop |
| 8 | + upload: |
| 9 | + name: Upload |
32 | 10 | permissions:
|
33 | 11 | contents: read
|
34 | 12 | checks: write # For the check run creation !
|
35 | 13 | 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 |
| - |
41 |
| - codecov-uploader: |
42 |
| - name: Codecov |
43 |
| - needs: [fetch-info] |
44 |
| - uses: yoanm/temp-reports-group-workspace/.github/workflows/codecov-upload-from-artifacts.yml@develop |
45 |
| - permissions: |
46 |
| - contents: read |
47 |
| - checks: write # For the check run creation ! |
48 |
| - secrets: |
49 |
| - TOKEN: ${{ secrets.CODECOV_TOKEN }} |
50 |
| - with: |
51 |
| - artifacts-pattern: coverage-groups-* |
52 |
| - run-id: ${{ needs.fetch-info.outputs.run-id }} |
53 |
| - override-commit: ${{ needs.fetch-info.outputs.commit-sha }} |
54 |
| - override-branch: ${{ needs.fetch-info.outputs.branch }} |
55 |
| - override-pr: ${{ needs.fetch-info.outputs.pr-number }} |
56 |
| - override-build: ${{ needs.fetch-info.outputs.run-id }} |
57 |
| - override-build-url: ${{ needs.fetch-info.outputs.run-url }} |
58 |
| - |
59 |
| - debug-context: |
60 |
| - name: DEBUG - context |
61 |
| - runs-on: ubuntu-latest |
62 |
| - steps: |
63 |
| - - run: | |
64 |
| - echo '{' |
65 |
| - echo '"github.action": ${{ toJson(github.action) }},' |
66 |
| - echo '"github.action_path": ${{ toJson(github.action_path) }},' |
67 |
| - echo '"github.action_ref": ${{ toJson(github.action_ref) }},' |
68 |
| - echo '"github.action_repository": ${{ toJson(github.action_repository) }},' |
69 |
| - echo '"github.action_status": ${{ toJson(github.action_status) }},' |
70 |
| - echo '"github.actor": ${{ toJson(github.actor) }},' |
71 |
| - echo '"github.actor_id": ${{ toJson(github.actor_id) }},' |
72 |
| - echo '"github.base_ref": ${{ toJson(github.base_ref) }},' |
73 |
| - echo '"github.event": ${{ toJson(github.event) }},' |
74 |
| - echo '"github.event_name": ${{ toJson(github.event_name) }},' |
75 |
| - echo '"github.event_path": ${{ toJson(github.event_path) }},' |
76 |
| - echo '"github.head_ref": ${{ toJson(github.head_ref) }},' |
77 |
| - echo '"github.job": ${{ toJson(github.job) }},' |
78 |
| - echo '"github.path": ${{ toJson(github.path) }},' |
79 |
| - echo '"github.ref": ${{ toJson(github.ref) }},' |
80 |
| - echo '"github.ref_name": ${{ toJson(github.ref_name) }},' |
81 |
| - echo '"github.ref_protected": ${{ toJson(github.ref_protected) }},' |
82 |
| - echo '"github.ref_type": ${{ toJson(github.ref_type) }},' |
83 |
| - echo '"github.repository": ${{ toJson(github.repository) }},' |
84 |
| - echo '"github.repository_id": ${{ toJson(github.repository_id) }},' |
85 |
| - echo '"github.repository_owner": ${{ toJson(github.repository_owner) }},' |
86 |
| - echo '"github.repository_owner_id": ${{ toJson(github.repository_owner_id) }},' |
87 |
| - echo '"github.repositoryUrl": ${{ toJson(github.repositoryUrl) }},' |
88 |
| - echo '"github.run_id": ${{ toJson(github.run_id) }},' |
89 |
| - echo '"github.run_number": ${{ toJson(github.run_number) }},' |
90 |
| - echo '"github.run_attempt": ${{ toJson(github.run_attempt) }},' |
91 |
| - echo '"github.sha": ${{ toJson(github.sha) }},' |
92 |
| - echo '"github.triggering_actor": ${{ toJson(github.triggering_actor) }},' |
93 |
| - echo '"github.workflow": ${{ toJson(github.workflow) }},' |
94 |
| - echo '"github.workflow_ref": ${{ toJson(github.workflow_ref) }},' |
95 |
| - echo '"github.workflow_sha": ${{ toJson(github.workflow_sha) }},' |
96 |
| - echo '"github.workspace": ${{ toJson(github.workspace) }}' |
97 |
| - echo '}' |
98 |
| -
|
99 |
| - debug-uploads: |
100 |
| - name: DEBUG - Uploaders |
101 |
| - runs-on: ubuntu-latest |
102 |
| - needs: [ codacy-uploader, codecov-uploader ] |
103 |
| - steps: |
104 |
| - - run: echo 'codecov='"'"'${{ toJson(needs.codecov-uploader) }}'"'" |
105 |
| - - run: echo 'codacy='"'"'${{ toJson(needs.codacy-uploader) }}'"'" |
| 14 | + CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} |
| 15 | + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
| 16 | + uses: ./.github/workflows/reusable-coverage-upload-workflow.yml |
0 commit comments