diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 67f82270f..dc7d46e65 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -1,6 +1,10 @@ name: "Copilot Setup Steps" -on: workflow_dispatch +on: + workflow_dispatch: + pull_request: + paths: + - .github/workflows/copilot-setup-steps.yml jobs: copilot-setup-steps: @@ -16,14 +20,15 @@ jobs: - name: Setup build directories on secondary disk run: | echo "Setting up build directories on /mnt (secondary disk with 66G+ free)" - mkdir -p /mnt/build-output - mkdir -p /mnt/externals - mkdir -p /mnt/generated + sudo mkdir -p /mnt/build-output + sudo mkdir -p /mnt/externals + sudo mkdir -p /mnt/generated + sudo chmod -R 777 /mnt/build-output /mnt/externals /mnt/generated # Create symlinks to use the secondary disk ln -s /mnt/build-output ./output - ln -s /mnt/externals ./externals-link - ln -s /mnt/generated ./generated-link + ln -s /mnt/externals ./externals + ln -s /mnt/generated ./generated echo "Build directories configured:" ls -la | grep -E "(output|externals|generated)" @@ -70,8 +75,6 @@ jobs: - name: Log disk space (after externals cache restore) uses: ./.github/workflows/log-disk-space - with: - detailed: 'true' - name: Run dotnet cake run: dotnet cake @@ -79,8 +82,6 @@ jobs: - name: Log disk space (after dotnet cake) uses: ./.github/workflows/log-disk-space - with: - detailed: 'true' # Save the externals cache after dotnet cake runs # This ensures the cache reflects the original config.json state diff --git a/.github/workflows/log-disk-space/action.yml b/.github/workflows/log-disk-space/action.yml index 1fc7361c4..51a170418 100644 --- a/.github/workflows/log-disk-space/action.yml +++ b/.github/workflows/log-disk-space/action.yml @@ -1,10 +1,5 @@ name: Log Disk Space description: Logs disk space usage on the runner -inputs: - detailed: - description: 'Whether to include detailed disk analysis (true/false)' - required: false - default: 'false' runs: using: composite steps: @@ -13,48 +8,3 @@ runs: run: | echo "=== Disk Space Usage ===" df -h - echo "" - echo "=== Disk Usage by Directory (/) ===" - du -h -d 1 / 2>/dev/null | sort -hr | head -20 || true - echo "" - echo "=== Disk Usage in Current Directory ===" - du -h -d 1 . 2>/dev/null | sort -hr | head -20 || true - echo "" - echo "=== Disk Usage Summary ===" - df -h / | tail -1 | awk '{print "Used: " $3 " / " $2 " (" $5 " full)"}' - - # Detailed analysis if requested - if [ "${{ inputs.detailed }}" = "true" ]; then - echo "" - echo "=== DETAILED ANALYSIS ===" - echo "" - echo "=== Largest directories in /home/runner ===" - sudo du -h /home/runner 2>/dev/null | sort -rh | head -20 - echo "" - echo "=== Largest directories in /opt ===" - sudo du -h /opt 2>/dev/null | sort -rh | head -20 - echo "" - echo "=== Workspace breakdown (top level) ===" - du -h --max-depth=1 . 2>/dev/null | sort -rh - echo "" - echo "=== Workspace breakdown (2 levels deep) ===" - du -h --max-depth=2 . 2>/dev/null | sort -rh | head -30 - echo "" - echo "=== externals directory ===" - du -sh ./externals/* 2>/dev/null | sort -rh | head -20 || echo "No externals" - echo "" - echo "=== output directory ===" - du -sh ./output/* 2>/dev/null | sort -rh | head -20 || echo "No output" - echo "" - echo "=== generated directory ===" - du -sh ./generated/* 2>/dev/null | sort -rh | head -20 || echo "No generated" - echo "" - echo "=== /mnt disk usage ===" - du -h --max-depth=1 /mnt 2>/dev/null | sort -rh - echo "" - echo "=== Docker usage ===" - docker system df 2>/dev/null || echo "Docker not available" - echo "" - echo "=== Temp directories ===" - du -sh /tmp /var/tmp 2>/dev/null || true - fi