-
Notifications
You must be signed in to change notification settings - Fork 10
38 lines (33 loc) · 1017 Bytes
/
clean-reports.yml
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
name: Clean reports when issues/PR are closed
on:
schedule:
- cron: '30 3 * * 3'
workflow_dispatch:
jobs:
clean:
runs-on: ubuntu-latest
steps:
- name: Checkout validate-repos
uses: actions/checkout@v4
- name: Setup node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: |
npm ci
- name: Drop reports locally when related issues/PR are closed
run: node reporting/clean-reports.js
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create PR to drop reports from repo if needed
uses: peter-evans/create-pull-request@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: Drop reports whose related issues have been closed
commit-message: "Drop reports whose related issues have been closed"
body: ${{ env.dropped_reports }}
assignees: dontcallmedom
branch: clean-reports
branch-suffix: timestamp