-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (57 loc) · 2.11 KB
/
Copy pathnotify_maintainers.yml
File metadata and controls
66 lines (57 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Notify Maintainers
on:
workflow_call:
inputs:
trigger-type:
type: string
required: true
description: "trigger type to use in partial report name"
workflow-type:
type: string
required: true
description: "type of workflow calling, allowed values: release, spec_change, pr"
execution-time:
type: string
required: true
description: "time of execution"
jobs:
notify-maintainers:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: retention-failures-report
path: reports/
merge-multiple: true
- name: check if report is empty
id: check-report-empty
run: |
result=$(jq '. == []' reports/retention-failures-report.json)
echo "report_empty=${result}" >> $GITHUB_OUTPUT
- name: Generate PR summary
id: generate-pr-summary
if: ${{ inputs.workflow-type == 'pr' && steps.check-report-empty.outputs.report_empty == 'false'}}
run: |
python scripts/generate_issue.py \
--failure_path=reports/retention-failures-report.json \
--issue_path=generated-files/summary.md \
--skip-maintainers
cat generated-files/summary.md >> $GITHUB_STEP_SUMMARY
- name: Run task for Collect Reports
id: generate-issue-report
if: ${{ inputs.workflow-type != 'pr' && steps.check-report-empty.outputs.report_empty == 'false'}}
run: |
python scripts/generate_issue.py \
--failure_path=reports/retention-failures-report.json \
--issue_path=generated-files/issue.md
- name: Create Issue From File
uses: peter-evans/create-issue-from-file@v5
if: ${{ inputs.workflow-type != 'pr' && steps.check-report-empty.outputs.report_empty == 'false'}}
with:
title: new failures in report from run ${{ github.run_id }}
content-filepath: generated-files/issue.md
labels: |
report
automated issue