Skip to content

Commit c7fac6e

Browse files
committed
Try to fix path
1 parent 43342e0 commit c7fac6e

1 file changed

Lines changed: 22 additions & 12 deletions

File tree

.github/workflows/quality-monitor-pit.yml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,48 @@ name: 'Quality Monitor Comment'
22

33
on:
44
workflow_run:
5-
workflows: ["Quality Monitor Build"]
6-
types: [completed]
5+
workflows: [ "Quality Monitor Build" ]
6+
types: [ completed ]
7+
78
permissions:
89
actions: read
910
contents: read
1011
pull-requests: write
1112

1213
jobs:
1314
comment:
14-
1515
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' }}
16-
runs-on: [ubuntu-latest]
17-
16+
runs-on: ubuntu-latest
1817
steps:
18+
- name: PR Metadaten extrahieren
19+
id: pr
20+
run: |
21+
pr_number='${{ github.event.workflow_run.pull_requests[0].number }}'
22+
echo "number=$pr_number" >> "$GITHUB_OUTPUT"
23+
sha='${{ github.event.workflow_run.head_sha }}'
24+
echo "sha=$sha" >> "$GITHUB_OUTPUT"
25+
- name: Repository auschecken (für Config-Dateien)
26+
uses: actions/checkout@v4
27+
with:
28+
ref: ${{ steps.pr.outputs.sha }}
1929
- name: Artefakt laden
2030
uses: actions/download-artifact@v4
2131
with:
2232
run-id: ${{ github.event.workflow_run.id }}
23-
name: quality-reports
24-
- name: Load Quality Gates JSON
33+
name: quality-reports # muss exakt dem Upload-Namen entsprechen
34+
- name: Quality Gates laden
2535
id: quality-gates
2636
run: echo "json=$(jq -c . .github/quality-gates.json)" >> "$GITHUB_OUTPUT"
27-
- name: Load Quality Monitor Config
37+
- name: Quality Monitor Config laden
2838
id: quality-monitor
2939
run: echo "json=$(jq -c . .github/quality-monitor.json)" >> "$GITHUB_OUTPUT"
30-
- name: Run Quality Monitor
40+
- name: Quality Monitor ausführen
3141
uses: uhafner/quality-monitor@delete-comments
3242
with:
33-
sha: ${{ github.event.pull_request.head.sha }}
43+
sha: ${{ steps.pr.outputs.sha }}
3444
config: ${{ steps.quality-monitor.outputs.json }}
3545
quality-gates: ${{ steps.quality-gates.outputs.json }}
3646
pr-number: ${{ steps.pr.outputs.number }}
37-
comments-strategy: 'UPDATE'
47+
comments-strategy: UPDATE
3848
show-headers: true
39-
title-metric: 'tests-success-rate'
49+
title-metric: tests-success-rate

0 commit comments

Comments
 (0)