-
Notifications
You must be signed in to change notification settings - Fork 16
Clean up #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis pull request introduces a new GitHub Action, "Free Disk Space", which executes a composite run strategy to display disk usage before cleanup, remove specified unnecessary directories, and then display the disk usage after cleanup. Additionally, several scripts and workflows related to container image building, pushing, manifest management, and artifact fetching have been removed from the repository. Changes
Sequence Diagram(s)sequenceDiagram
participant Runner as CI Runner
participant Action as Free Disk Space Action
Runner->>Action: Trigger "Free Disk Space" action
Action->>Runner: Execute "df -h" (Before cleanup)
Action->>Runner: Run cleanup commands (sudo rm -rf directories)
Action->>Runner: Execute "df -h" (After cleanup)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/actions/free-disk-space/action.yaml (1)
11-19: Disk Cleanup Command & Safety Considerations
The "Free disk space" step uses a multi-line command to remove directories deemed unnecessary on the runner. A few points to consider:
Directory Verification: Ensure that each directory (including the environment variable
$AGENT_TOOLSDIRECTORY) is indeed safe for deletion in your CI context.Guarding Against Accidental Deletion: It might be beneficial to add a check ensuring that
$AGENT_TOOLSDIRECTORYis not empty. For example, you could modify the command to conditionally remove this directory:- - name: Free disk space - run: | - sudo rm -rf \ - "$AGENT_TOOLSDIRECTORY" \ - /opt/ghc \ - /usr/local/lib/android \ - /usr/local/share/boost \ - /usr/share/dotnet + - name: Free disk space + run: | + [ -n "$AGENT_TOOLSDIRECTORY" ] && sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo rm -rf \ + /opt/ghc \ + /usr/local/lib/android \ + /usr/local/share/boost \ + /usr/share/dotnetLogging: Optionally, adding some echo statements to log which directories are being removed can ease troubleshooting and verification during CI runs.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.github/actions/free-disk-space/action.yaml(1 hunks).github/workflow-scripts/buildah-build-and-push-manifest.sh(0 hunks).github/workflows/build-bootc.yaml(0 hunks).github/workflows/build-rhel-bootc.yaml(0 hunks)Makefile(0 hunks)fetch-artifact.sh(0 hunks)
💤 Files with no reviewable changes (5)
- fetch-artifact.sh
- .github/workflow-scripts/buildah-build-and-push-manifest.sh
- Makefile
- .github/workflows/build-bootc.yaml
- .github/workflows/build-rhel-bootc.yaml
🔇 Additional comments (4)
.github/actions/free-disk-space/action.yaml (4)
1-4: File Header & Metadata
The header and metadata are well-formed. The action’s name and description clearly articulate its purpose.
5-7: Composite Run Setup
The composite run configuration under therunskey is correctly set up, and the structure provides a clear sequence of steps for this action.
8-10: Pre-Cleanup Disk Usage Snapshot
The "Disk space before" step usesdf -happropriately to capture disk usage prior to cleanup. This provides a useful baseline for later comparison.
20-22: Post-Cleanup Disk Usage Snapshot
The final step executesdf -hagain to verify the effect of the cleanup. This is a good practice for confirming that disk space has been freed.
Summary by CodeRabbit
New Features
Chores