-
Notifications
You must be signed in to change notification settings - Fork 4
37 lines (31 loc) · 958 Bytes
/
cleanup-target.yml
File metadata and controls
37 lines (31 loc) · 958 Bytes
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
name: Cleanup Target Directory
on:
schedule:
- cron: '0 0 * * 0' # Weekly cleanup on Sundays at midnight UTC
workflow_dispatch:
jobs:
cleanup:
name: Clean old build artifacts
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Clean release artifacts
run: |
cargo clean --release
cargo clean --doc
- name: Display disk usage
run: |
echo "Target directory size after cleanup:"
du -sh target/
- name: Summary
run: |
echo "### Cleanup completed" >> $GITHUB_STEP_SUMMARY
echo "- Cleaned release artifacts" >> $GITHUB_STEP_SUMMARY
echo "- Cleaned documentation artifacts" >> $GITHUB_STEP_SUMMARY