Skip to content

Commit a724708

Browse files
committed
Try
1 parent 71b9656 commit a724708

File tree

7 files changed

+27
-11
lines changed

7 files changed

+27
-11
lines changed

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

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/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: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ async function run() {
3131
conclusion: undefinedIfEmpty(checkConclusion),
3232
started_at: undefinedIfEmpty(startedAt),
3333
completed_at: undefinedIfEmpty(completedAt),
34-
owner: repoOwner,
35-
repo: repoName
3634
};
3735
if (!isEmpty(outputTitle) || !isEmpty(outputSummary)) {
3836
res.output = {title: undefinedIfEmpty(outputTitle), summary: undefinedIfEmpty(outputSummary)};
@@ -44,7 +42,12 @@ async function run() {
4442
const apiResponse = await core.group('Call API', async () => {
4543
const octokit = github.getOctokit(githubToken);
4644

47-
return octokit.request('POST /repos/{owner}/{repo}/check-runs', requestParams);
45+
// @TODO Move back to `octokit.rest.checks.create()`
46+
const res = await octokit.request('POST /repos/' + repoOwner+ '/' + repoName + '/check-runs', requestParams);
47+
48+
core.info('TMP DEBUG0 ' + JSON.stringify(res));
49+
50+
return res;
4851
});
4952
core.info('TMP DEBUG' + JSON.stringify(apiResponse));
5053

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ runs:
4747
})
4848
);
4949
50-
# @TODO move reports-group/load-metadata action to a dedicated repo and remove the checkout
50+
# @TODO move actions to a dedicated repo and remove the checkout
5151
- uses: actions/checkout@v4
5252
with:
5353
path: custom-action-repo

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ runs:
9191
})
9292
);
9393
94-
# @TODO move reports-group/load-metadata action to a dedicated repo and remove the checkout
94+
# @TODO move actions to a dedicated repo and remove the checkout
9595
- uses: actions/checkout@v4
9696
with:
9797
path: custom-action-repo

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ jobs:
3636
outputs:
3737
groups: ${{ steps.upload.outputs.groups }}
3838
reports: ${{ steps.upload.outputs.reports }}
39+
permissions:
40+
contents: read
41+
checks: write # For the check run creation !
3942
steps:
4043
# @TODO move actions to a dedicated repo and remove the checkout
4144
- uses: actions/checkout@v4

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ jobs:
2828
outputs:
2929
matrix: ${{ steps.build-matrix.outputs.matrix }}
3030
list-for-output: ${{ steps.find-groups.outputs.list }}
31+
permissions:
32+
contents: read
33+
checks: write # For the check run creation !
3134
steps:
32-
# @TODO move reports-group/load-metadata action to a dedicated repo and remove the checkout
35+
# @TODO move actions to a dedicated repo and remove the checkout
3336
- uses: actions/checkout@v4
3437
with:
3538
path: custom-action-repo
@@ -104,6 +107,9 @@ jobs:
104107
fail-fast: true
105108
max-parallel: 4
106109
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
110+
permissions:
111+
contents: read
112+
checks: write # For the check run creation !
107113
steps:
108114
- name: DEBUG matrix
109115
run: echo 'matrix='"'"'${{ toJson(matrix) }}'"'"
@@ -113,7 +119,12 @@ jobs:
113119
- name: Checkout Repository
114120
uses: actions/checkout@v4
115121

116-
- uses: ./.github/actions/reports-group/attach-check-run-to-triggering-workflow-action
122+
# @TODO move actions to a dedicated repo and remove the checkout
123+
- uses: actions/checkout@v4
124+
with:
125+
path: custom-action-repo
126+
127+
- uses: ./custom-action-repo/.github/actions/reports-group/attach-check-run-to-triggering-workflow-action
117128
with:
118129
name: "${{ github.workflow }} (${{ github.event.workflow.name}}) / Codecov / ${{ matrix.artifact}} - ${{ matrix.path }}"
119130
commit-sha: "${{ ('workflow_run' == github.event_name && ('pull_request' == github.event.workflow_run.event || 'push' == github.event.workflow_run.event) && github.event.workflow_run.head_sha) || ('pull_request' == github.event_name && github.event.pull_request.head.sha) || ('push' == github.event_name && github.sha) || null }}"
@@ -133,10 +144,9 @@ jobs:
133144
ls -ail job-artifact/*
134145
ls -ail job-artifact/*/*
135146
136-
# @TODO move reports-group/codecov-uploader action to a dedicated repo and remove the checkout
137147
- name: Upload reports
138148
id: upload
139-
uses: ./.github/actions/reports-group/codecov-uploader
149+
uses: ./custom-action-repo/.github/actions/reports-group/codecov-uploader
140150
with:
141151
path: job-artifact/${{ matrix.path }}
142152
token: ${{ secrets.TOKEN }}

0 commit comments

Comments
 (0)