Repository navigation
feat: Add Deno DevContainer feature #263
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
Changes from 4 commits
2888e35
835519d
633b5a6
a0df7b9
4e810a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,20 @@ jobs: | |
| security-events: write | ||
|
|
||
| steps: | ||
| - name: Free disk space before scan | ||
| run: | | ||
| echo "=== Disk space before cleanup ===" | ||
| df -h | ||
|
|
||
| docker system prune -af --volumes | ||
| sudo rm -rf /usr/local/lib/android || true | ||
| sudo rm -rf /usr/share/dotnet || true | ||
| sudo rm -rf /opt/ghc || true | ||
| sudo rm -rf /usr/local/share/boost || true | ||
|
|
||
| echo "=== Disk space after cleanup ===" | ||
| df -h | ||
|
Comment on lines
+32
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major Consolidate duplicated disk cleanup logic. The disk cleanup step is duplicated identically in both jobs. This violates DRY principles and creates a maintenance burden—any future adjustments to the cleanup logic must be applied in two places, increasing the risk of inconsistency. Consider extracting this into a composite action or creating a reusable workflow step that both jobs can reference. Example: Composite action approachCreate name: 'Free Disk Space'
description: 'Clean up disk space on GitHub Actions runners'
runs:
using: 'composite'
steps:
- name: Free disk space
shell: bash
run: |
echo "=== Disk space before cleanup ==="
df -h
docker system prune -af --volumes
sudo rm -rf /usr/local/lib/android || true
sudo rm -rf /usr/share/dotnet || true
sudo rm -rf /opt/ghc || true
sudo rm -rf /usr/local/share/boost || true
echo "=== Disk space after cleanup ==="
df -hThen replace both cleanup steps with: - name: Free disk space
uses: ./.github/actions/free-disk-spaceThat said, the cleanup approach itself is sound and appropriately addresses the CI disk capacity failures mentioned in the PR. Also applies to: 103-115 🤖 Prompt for AI Agents |
||
|
|
||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
|
|
@@ -86,6 +100,20 @@ jobs: | |
| packages: read | ||
|
|
||
| steps: | ||
| - name: Free disk space before SBOM generation | ||
| run: | | ||
| echo "=== Disk space before cleanup ===" | ||
| df -h | ||
|
|
||
| docker system prune -af --volumes | ||
| sudo rm -rf /usr/local/lib/android || true | ||
| sudo rm -rf /usr/share/dotnet || true | ||
| sudo rm -rf /opt/ghc || true | ||
| sudo rm -rf /usr/local/share/boost || true | ||
|
|
||
| echo "=== Disk space after cleanup ===" | ||
| df -h | ||
|
|
||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.