Skip to content

Commit ccf2c8f

Browse files
committed
Improve
1 parent aef7b7a commit ccf2c8f

File tree

5 files changed

+78
-23
lines changed

5 files changed

+78
-23
lines changed

.github/actions/reports-group/codacy-uploader-action/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ inputs:
99
description: Codacy project token for the repository
1010
required: true
1111
override-commit:
12-
description: Force the commit linked to the uploaded reports
12+
description: |
13+
Force the commit SHA linked to the uploaded reports.
14+
Mostly useful for specific cases (e.g. `workflow_run` workflow).
1315
required: false
1416
follow-symbolic-links:
1517
description: Indicates whether to follow symbolic links when resolving `path`

.github/actions/reports-group/codecov-uploader-action/action.yml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,41 @@ inputs:
99
description: Codecov upload token
1010
required: true
1111
override-commit:
12-
description: Commit to link to the uploaded reports
12+
description: |
13+
Force the commit SHA linked to the uploaded reports.
14+
Mostly useful for specific cases (e.g. `workflow_run` workflow).
15+
16+
In case input is filled, `override-branch` input (as well as `override-pr` in case of `pull_request` event)
17+
should be filled too in order to keep consitency between values !
1318
required: false
1419
override-branch:
15-
description: Branch to link to the uploaded reports
20+
description: |
21+
Force the branch linked to the uploaded reports.
22+
Mostly useful for specific cases (e.g. `workflow_run` workflow).
23+
24+
In case input is filled, `override-commit` input (as well as `override-pr` in case of `pull_request` event)
25+
should be filled too in order to keep consitency between values !
1626
required: false
1727
override-pr:
18-
description: PR to link to the uploaded reports
28+
description: |
29+
Force the PR linked to the uploaded reports.
30+
Mostly useful for specific cases (e.g. `workflow_run` workflow triggered by a `pull_request` workflow).
31+
32+
In case input is filled, `override-commit` and `override-branch` inputs should be filled too in order
33+
to keep consitency between values !
1934
required: false
2035
override-build:
21-
description: Workflow run to link to the uploaded reports
36+
description: |
37+
Workflow run ID to link to the uploaded reports.
38+
Mostly useful for specific cases (e.g. `workflow_run` workflow).
2239
required: false
2340
override-build-url:
24-
description: Workflow run url to link to the uploaded reports
41+
description: |
42+
Workflow run url to link to the uploaded reports.
43+
Usually something like `${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}` (based on GHA environment variables).
44+
Mostly useful for specific cases (e.g. `workflow_run` workflow).
45+
46+
In case input is filled, `override-build` input most likely need to be filled too in order to keep consitency between values !
2547
required: false
2648
follow-symbolic-links:
2749
description: Indicates whether to follow symbolic links when resolving `path`

.github/workflows/CI.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ jobs:
244244
contents: read
245245
checks: write # For the check run creation !
246246
outputs:
247-
commit-sha: ${{ steps.fetch-workflow-metadata-action.outputs.commit-sha }}
248-
run-id: ${{ steps.fetch-workflow-metadata-action.outputs.run-id }}
247+
commit-sha: ${{ steps.fetch-workflow-metadata.outputs.commit-sha }}
248+
run-id: ${{ steps.fetch-workflow-metadata.outputs.run-id }}
249249
steps:
250250
- uses: ./custom-action-repo/.github/actions/reports-group/attach-check-run-to-triggering-workflow-action
251251
with:
@@ -254,7 +254,7 @@ jobs:
254254
fails-on-triggering-workflow-failure: true
255255

256256
- uses: ./custom-action-repo/.github/actions/reports-group/fetch-workflow-metadata-action
257-
id: fetch-workflow-metadata-action
257+
id: fetch-workflow-metadata
258258

259259
codacy-uploader:
260260
name: Codacy

.github/workflows/codacy-upload-from-artifacts.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,20 @@ on:
99
run-id:
1010
description: |
1111
The id of the workflow run where the artifacts were uploaded from (default to current run).
12-
In case artefacts have been uploadded from another run, this input must be filled with original workflow !
12+
In case artefacts have been uploadded from another run, this input must be filled with original workflow run id !
1313
required: false
1414
default: "${{ github.run_id }}"
1515
type: string
1616
override-commit:
17-
description: Force the commit linked to the uploaded reports
17+
description: |
18+
Force the commit SHA linked to the uploaded reports.
19+
Mostly useful for specific cases (e.g. `workflow_run` workflow).
20+
type: string
1821
required: false
1922
follow-symbolic-links:
2023
description: Indicates whether to follow symbolic links when resolving groups path
21-
default: 'false'
24+
type: boolean
25+
default: false
2226

2327
secrets:
2428
PROJECT_TOKEN:
@@ -40,7 +44,7 @@ jobs:
4044
reports: ${{ steps.upload.outputs.reports }}
4145
permissions:
4246
contents: read
43-
checks: write # For the check run creation !
47+
checks: write # For the check run creation ! @TODO check if doable to use inputs there and set read rather than write if ${{ !inputs.with-check-run }}
4448
steps:
4549
# @TODO move actions to a dedicated repo and remove the checkout
4650
- uses: actions/checkout@v4

.github/workflows/codecov-upload-from-artifacts.yml

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,60 @@ on:
99
run-id:
1010
description: |
1111
The id of the workflow run where the artifacts were uploaded from (default to current run).
12-
In case artefacts have been uploadded from another run, this input must be filled with original workflow !
12+
In case artefacts have been uploadded from another run, this input must be filled with original workflow run id !
1313
required: false
1414
default: "${{ github.run_id }}"
1515
type: string
1616
override-commit:
17-
description: Commit to link to the uploaded reports
17+
description: |
18+
Force the commit SHA linked to the uploaded reports.
19+
Mostly useful for specific cases (e.g. `workflow_run` workflow).
20+
21+
In case input is filled, `override-branch` input (as well as `override-pr` in case of `pull_request` event)
22+
should be filled too in order to keep consitency between values !
1823
type: string
1924
required: false
2025
override-branch:
21-
description: Branch to link to the uploaded reports
26+
description: |
27+
Force the branch linked to the uploaded reports.
28+
Mostly useful for specific cases (e.g. `workflow_run` workflow).
29+
30+
In case input is filled, `override-commit` input (as well as `override-pr` in case of `pull_request` event)
31+
should be filled too in order to keep consitency between values !
2232
type: string
2333
required: false
2434
override-pr:
25-
description: PR to link to the uploaded reports
35+
description: |
36+
Force the PR linked to the uploaded reports.
37+
Mostly useful for specific cases (e.g. `workflow_run` workflow triggered by a `pull_request` workflow).
38+
39+
In case input is filled, `override-commit` and `override-branch` inputs should be filled too in order
40+
to keep consitency between values !
2641
type: string
2742
required: false
2843
override-build:
29-
description: Workflow run to link to the uploaded reports
44+
description: |
45+
Workflow run ID to link to the uploaded reports.
46+
Mostly useful for specific cases (e.g. `workflow_run` workflow).
47+
48+
When `run-id` input is provided, this input should most likely have the same value.
3049
type: string
3150
required: false
3251
override-build-url:
33-
description: Workflow run url to link to the uploaded reports
52+
description: |
53+
Workflow run url to link to the uploaded reports.
54+
Usually something like `${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}` (based on GHA environment variables).
55+
Mostly useful for specific cases (e.g. `workflow_run` workflow).
56+
57+
In case input is filled, `override-build` input most likely need to be filled too in order to keep consitency between values !
3458
type: string
3559
required: false
3660
follow-symbolic-links:
37-
description: Indicates whether to follow symbolic links when resolving `path`
38-
default: 'false'
61+
description: |
62+
Indicates whether to follow symbolic links when resolving glob path.
63+
When looking for group directory for instance.
64+
type: boolean
65+
default: false
3966
secrets:
4067
TOKEN:
4168
required: true
@@ -53,7 +80,7 @@ jobs:
5380
list-for-output: ${{ steps.find-groups.outputs.list }}
5481
permissions:
5582
contents: read
56-
checks: write # For the check run creation !
83+
checks: write # For the check run creation ! @TODO check if doable to use inputs there and set read rather than write if ${{ !inputs.with-check-run }}
5784
steps:
5885
# @TODO move actions to a dedicated repo and remove the checkout
5986
- uses: actions/checkout@v4
@@ -132,7 +159,7 @@ jobs:
132159
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
133160
permissions:
134161
contents: read
135-
checks: write # For the check run creation !
162+
checks: write # For the check run creation ! @TODO check if doable to use inputs there and set read rather than write if ${{ !inputs.with-check-run }}
136163
steps:
137164
- name: DEBUG matrix
138165
run: echo 'matrix='"'"'${{ toJson(matrix) }}'"'"

0 commit comments

Comments
 (0)