Skip to content

Commit 5eb56e1

Browse files
committed
fixup! retry comments
1 parent fd13bb2 commit 5eb56e1

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

.github/workflows/dockerfile-deps.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,39 @@ jobs:
4545
const fs = require('fs');
4646
const report = fs.readFileSync('report.md', 'utf8');
4747
48+
// Extract only the validation sections
49+
const lines = report.split('\n');
50+
let output = [];
51+
let inValidationSection = false;
52+
let foundBuildOrder = false;
53+
54+
for (const line of lines) {
55+
if (line.startsWith('## Build Order') || line.startsWith('## Dependency Graph')) {
56+
foundBuildOrder = true;
57+
break;
58+
}
59+
if (line.startsWith('# Dockerfile Dependency Analysis') ||
60+
line.startsWith('**Dockerfile:**') ||
61+
line.startsWith('**Total Stages:**')) {
62+
output.push(line);
63+
continue;
64+
}
65+
if (line.startsWith('## Source of Truth Validation') ||
66+
line.startsWith('## Topological Validation')) {
67+
inValidationSection = true;
68+
}
69+
if (inValidationSection) {
70+
output.push(line);
71+
}
72+
}
73+
74+
const shortReport = output.join('\n').trim();
75+
4876
await github.rest.issues.createComment({
4977
owner: context.repo.owner,
5078
repo: context.repo.repo,
5179
issue_number: context.issue.number,
52-
body: `## Dockerfile Dependencies Changed\n\n${report}\n\n---\n*This check ensures Dockerfile dependencies are tracked and validated against the source of truth.*`
80+
body: `${shortReport}\n\n---\n*This check ensures Dockerfile dependencies are tracked and validated against the source of truth.*`
5381
});
5482
5583
- name: Fail if validation failed

0 commit comments

Comments
 (0)