-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (40 loc) · 1.06 KB
/
rm-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
39
40
41
42
43
44
45
46
47
48
name: Remove old reports
on:
# Run if files that could be relevant change.
push:
branches:
- master
paths:
- flake.*
- .github/workflows/rm-reports.yml
# Run daily
schedule:
- cron: '0 0 */1 * *'
jobs:
wait-for-gen-reports:
name: Wait for gen-reports
uses: ./.github/workflows/wait-for-workflow.yml
with:
workflow-id: gen-reports.yml
rm-reports:
name: Remove old reports
runs-on: ubuntu-latest
needs: wait-for-gen-reports
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: master
# We need the history
fetch-depth: 0
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v14
- name: Remove reports created over a week ago
run: |
nix run .#rm-reports-older-than -- 1 weeks
# We need to force push since this changes the repository history.
- name: Push changes
run: |
git config user.name github-actions
git config user.email [email protected]
git push --force