-
-
Notifications
You must be signed in to change notification settings - Fork 6
40 lines (36 loc) · 1.06 KB
/
clean-build-cache.yaml
File metadata and controls
40 lines (36 loc) · 1.06 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
name: Cleanup Build Cache
permissions: {}
on:
workflow_dispatch:
inputs:
dry_run:
description: "Do a dry-run"
required: true
type: boolean
default: true
older_than:
description: "Delete older then n"
required: true
default: "30 days"
schedule:
- cron: "0 1 * * FRI"
jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Delete older than (Manual)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 # v1.0.16
with:
package: rust-musl-buildcache
dry-run: ${{ inputs.dry_run }}
older-than: ${{ inputs.older_than }}
- name: Delete older than 30 days (Scheduled)
if: ${{ github.event_name == 'schedule' }}
uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 # v1.0.16
with:
package: rust-musl-buildcache
dry-run: false
older-than: 30 days