Skip to content

Commit 4ccb284

Browse files
committed
Improve
1 parent 032e9c8 commit 4ccb284

File tree

21 files changed

+111
-97
lines changed

21 files changed

+111
-97
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

.github/actions/reports-group/attach-check-run-to-triggering-workflow-action/dist/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/reports-group/attach-check-run-to-triggering-workflow-action/dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/reports-group/attach-check-run-to-triggering-workflow-action/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const core = require("@actions/core"); // @TODO move to 'imports from' when moved to TS !
22

3-
if (!!core.getState('check-run-id')) {
3+
if (!!core.getState('has-been-triggered')) {
44
require('./src/cleanup');
55
} else {
66
require('./src/main');

.github/actions/reports-group/attach-check-run-to-triggering-workflow-action/src/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const ghaHelpers = require('../node-gha-helpers');
66
const formatMarkdownUrl = (title, link) => '<a href="' + link + '" target="blank">' + title + '</a>';
77

88
async function run() {
9+
core.saveState('has-been-triggered', 1);
910
/** INPUTS **/
1011
const githubToken = core.getInput('github-token', {required: true});
1112
const jobStatus = core.getInput('job-status', {required: true});
@@ -71,6 +72,6 @@ async function run() {
7172
}
7273

7374
run().catch(e => {
74-
core.info('Error caught and ignored ' + e.message);
75+
core.warning('Error caught and ignored ' + e.message);
7576
core.debug('Error=' + JSON.stringify(e));
7677
});

.github/actions/reports-group/create-action/dist/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/reports-group/create-action/dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/reports-group/find-action/action.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ description: |
1010
name: Prepare upload
1111
runs-on: ubuntu-latest
1212
outputs:
13-
matrix: ${{ steps.upload.outputs.matrix }} # See job "Upload" below
14-
groups: ${{ steps.upload.outputs.paths }} # List of path to reports group directories
13+
matrix: $\{{ steps.upload.outputs.matrix }} # See job "Upload" below
14+
groups: $\{{ steps.upload.outputs.paths }} # List of path to reports group directories
1515
permissions:
1616
contents: read
17-
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 }}
17+
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 }}
1818
steps:
1919
# ... fetch data (checkout, artefacts, etc)
2020
2121
- uses: ./custom-action-repo/.github/actions/reports-group/attach-check-run-to-triggering-workflow-action
22-
if: ${{ 'workflow_run' == github.event_name }}
22+
if: $\{{ 'workflow_run' == github.event_name }}
2323
with:
24-
github-token: ${{ github.token }}
25-
job-status: ${{ job.status }}
24+
github-token: $\{{ github.token }}
25+
job-status: $\{{ job.status }}
2626
- name: Find reports groups
2727
id: find-groups
2828
uses: reports-group/find-action@v0.1.0
@@ -40,19 +40,19 @@ description: |
4040
name: Upload groups
4141
runs-on: ubuntu-latest
4242
outputs:
43-
matrix: ${{ steps.upload.outputs.matrix }} # See job "Upload" below
44-
groups: ${{ steps.upload.outputs.paths }} # List of path to reports group directories
43+
matrix: $\{{ steps.upload.outputs.matrix }} # See job "Upload" below
44+
groups: $\{{ steps.upload.outputs.paths }} # List of path to reports group directories
4545
permissions:
4646
contents: read
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 }}
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`
4848
steps:
4949
# ... fetch data (checkout, artefacts, etc)
5050
5151
- uses: ./custom-action-repo/.github/actions/reports-group/attach-check-run-to-triggering-workflow-action
52-
if: ${{ 'workflow_run' == github.event_name }}
52+
if: $\{{ 'workflow_run' == github.event_name }}
5353
with:
54-
github-token: ${{ github.token }}
55-
job-status: ${{ job.status }}
54+
github-token: $\{{ github.token }}
55+
job-status: $\{{ job.status }}
5656
- name: Find reports groups
5757
id: find-groups
5858
uses: reports-group/find-action@v0.1.0
@@ -112,7 +112,7 @@ inputs:
112112
glue-string:
113113
description: String used to concatenate values.
114114
required: false
115-
// "Filtering" phases
115+
# "Filtering" phases
116116
forbidden-groups:
117117
description: |
118118
Multiline list of group name.
@@ -177,7 +177,7 @@ inputs:
177177
Note: "Allowed" phase is performed **after "Forbidden" phase**.
178178
required: false
179179
default: ''
180-
// Artifact mode
180+
# Artifact mode
181181
artifacts-mode:
182182
description: |
183183
Each root directory of the provided `path` will be treated as artifact content. `path` must be a single valid path and not a glob pattern !
@@ -186,14 +186,14 @@ inputs:
186186
Note: `artifacts-mode` is applied **after ""Filtering" phases** (`forbidden-*` and `allowed-*`)
187187
required: false
188188
default: 'false'
189-
// Path-only mode
189+
# Path-only mode
190190
paths-only-mode:
191191
description: |
192192
Setting this to `true` will avoid subsequent operation (only filtering in & out has been performed and `artifacts-mode` enabled if needed) and just
193193
build the list of path. Use this along with `path` input from reports-group/load-metadata-action in order to quickly merge multiple group into one.
194194
required: false
195195
default: 'false'
196-
// "Grouping" phase
196+
# "Grouping" phase
197197
group-by:
198198
description: |
199199
Comma separated list of field used to group metadata list as a set of list.
@@ -208,11 +208,11 @@ inputs:
208208
Note: "Grouping" phase is performed **after the "Filtering" phase** (`forbidden-*` and `allowed-*`) and after `artifacts-mode` may have been enabled
209209
required: false
210210
default: ''
211-
// Matrix mode
211+
# Matrix mode
212212
matrix-mode:
213213
description: |
214214
Setting this to `true` will create an output named `matrix` (`list` output won't be filled !) containing a JSON matrix object.
215-
Re-use it to create job matrix: `matrix: ${{ fromJson(STEP_OUTPUTS.matrix) }}`
215+
Re-use it to create job matrix: `matrix: $\{{ fromJson(STEP_OUTPUTS.matrix) }}`
216216
217217
Note: `matrix-mode` is applied at the very end of the process, job context will be the shape attached to `format` description, based on all previous inputs configured
218218
required: false
@@ -240,7 +240,7 @@ outputs:
240240
matrix:
241241
description: |
242242
Filled only with `matrix` format and if `paths-only-mode` is not enabled !
243-
A JSON encoded object which can be re-used as Job matrix by using the following notation: `matrix: ${{ fromJson(STEP_OUTPUTS.matrix) }}`
243+
A JSON encoded object which can be re-used as Job matrix by using the following notation: `matrix: $\{{ fromJson(STEP_OUTPUTS.matrix) }}`
244244
245245
See `format` and `matrix-mode` description to figure out the metatada shape based on your inputs
246246

.github/actions/reports-group/find-action/dist/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/reports-group/find-action/dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)