|
5 | 5 | types: [completed] |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - fetch-info: |
9 | | - name: Fetch triggering workflow metadata |
10 | | - runs-on: ubuntu-latest |
| 8 | + upload: |
| 9 | + name: Upload |
11 | 10 | permissions: |
12 | 11 | contents: read |
13 | 12 | checks: write # For the check run creation ! |
14 | | - steps: |
15 | | - - name: 'Check run ○' |
16 | | - uses: yoanm/temp-reports-group-workspace/gha-attach-check-run-to-triggering-workflow@improve |
17 | | - with: |
18 | | - name: 'Fetch coverage info' |
19 | | - fails-on-triggering-workflow-failure: true |
20 | | - |
21 | | - - uses: yoanm/temp-reports-group-workspace/gha-fetch-workflow-metadata@improve |
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@improve |
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 }} # Uploader action doesn't support it ! |
41 | | - |
42 | | - codecov-uploader: |
43 | | - name: Codecov |
44 | | - needs: [fetch-info] |
45 | | - uses: yoanm/temp-reports-group-workspace/.github/workflows/codecov-upload-from-artifacts.yml@improve |
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 }} |
59 | | - |
60 | | - debug-context: |
61 | | - name: DEBUG - context |
62 | | - runs-on: ubuntu-latest |
63 | | - steps: |
64 | | - - run: | |
65 | | - echo '{' |
66 | | - echo '"github.action": ${{ toJson(github.action) }},' |
67 | | - echo '"github.action_path": ${{ toJson(github.action_path) }},' |
68 | | - echo '"github.action_ref": ${{ toJson(github.action_ref) }},' |
69 | | - echo '"github.action_repository": ${{ toJson(github.action_repository) }},' |
70 | | - echo '"github.action_status": ${{ toJson(github.action_status) }},' |
71 | | - echo '"github.actor": ${{ toJson(github.actor) }},' |
72 | | - echo '"github.actor_id": ${{ toJson(github.actor_id) }},' |
73 | | - echo '"github.base_ref": ${{ toJson(github.base_ref) }},' |
74 | | - echo '"github.event": ${{ toJson(github.event) }},' |
75 | | - echo '"github.event_name": ${{ toJson(github.event_name) }},' |
76 | | - echo '"github.event_path": ${{ toJson(github.event_path) }},' |
77 | | - echo '"github.head_ref": ${{ toJson(github.head_ref) }},' |
78 | | - echo '"github.job": ${{ toJson(github.job) }},' |
79 | | - echo '"github.path": ${{ toJson(github.path) }},' |
80 | | - echo '"github.ref": ${{ toJson(github.ref) }},' |
81 | | - echo '"github.ref_name": ${{ toJson(github.ref_name) }},' |
82 | | - echo '"github.ref_protected": ${{ toJson(github.ref_protected) }},' |
83 | | - echo '"github.ref_type": ${{ toJson(github.ref_type) }},' |
84 | | - echo '"github.repository": ${{ toJson(github.repository) }},' |
85 | | - echo '"github.repository_id": ${{ toJson(github.repository_id) }},' |
86 | | - echo '"github.repository_owner": ${{ toJson(github.repository_owner) }},' |
87 | | - echo '"github.repository_owner_id": ${{ toJson(github.repository_owner_id) }},' |
88 | | - echo '"github.repositoryUrl": ${{ toJson(github.repositoryUrl) }},' |
89 | | - echo '"github.run_id": ${{ toJson(github.run_id) }},' |
90 | | - echo '"github.run_number": ${{ toJson(github.run_number) }},' |
91 | | - echo '"github.run_attempt": ${{ toJson(github.run_attempt) }},' |
92 | | - echo '"github.sha": ${{ toJson(github.sha) }},' |
93 | | - echo '"github.triggering_actor": ${{ toJson(github.triggering_actor) }},' |
94 | | - echo '"github.workflow": ${{ toJson(github.workflow) }},' |
95 | | - echo '"github.workflow_ref": ${{ toJson(github.workflow_ref) }},' |
96 | | - echo '"github.workflow_sha": ${{ toJson(github.workflow_sha) }},' |
97 | | - echo '"github.workspace": ${{ toJson(github.workspace) }}' |
98 | | - echo '}' |
99 | | -
|
100 | | - debug-uploads: |
101 | | - name: DEBUG - Uploaders |
102 | | - runs-on: ubuntu-latest |
103 | | - needs: [ codacy-uploader, codecov-uploader ] |
104 | | - steps: |
105 | | - - run: echo 'codecov='"'"'${{ toJson(needs.codecov-uploader) }}'"'" |
106 | | - - run: echo 'codacy='"'"'${{ toJson(needs.codacy-uploader) }}'"'" |
| 13 | + uses: ./.github/workflows/reusable-coverage-upload-workflow.yml |
0 commit comments