fix(ci): fix Docker push permissions, macOS disk space, and audit summary overflow

- build-publish-images: replace silent sudo chown failure (2>/dev/null || true)
  with proper error handling and fallback cleanup for all 7 push jobs.
  Root cause: container build jobs create root-owned files, non-container push
  jobs on runner2 couldn't sudo chown without sudoers config.
- tests-misc: add disk cleanup step to cargo-check-all-crate-macos job to free
  space before cargo check (remove Android SDK, old CLT SDKs, etc.)
- security-audit: truncate cargo-audit output to 500 lines before writing to
  GITHUB_STEP_SUMMARY to avoid the 1MB size limit crash.
This commit is contained in:
Kurdistan Tech Ministry committed 2026-03-02 13:58:38 +03:00
1 parent 233f6fcb9d
commit f8c4bca688
3 files changed
+59 -8

No files matched your search

+42 -7
View File
@@ -490,7 +490,12 @@ jobs:
timeout-minutes: 180
steps:
- name: Fix workspace permissions
run: sudo chown -R "$(whoami)" "$GITHUB_WORKSPACE" 2>/dev/null || true
run: |
sudo chown -R "$(whoami)" "$GITHUB_WORKSPACE" || {
echo "::warning::sudo chown failed - attempting cleanup"
rm -rf "${GITHUB_WORKSPACE:?}"/* 2>/dev/null || true
rm -rf "${GITHUB_WORKSPACE:?}"/.[!.]* 2>/dev/null || true
}
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -518,7 +523,12 @@ jobs:
timeout-minutes: 180
steps:
- name: Fix workspace permissions
run: sudo chown -R "$(whoami)" "$GITHUB_WORKSPACE" 2>/dev/null || true
run: |
sudo chown -R "$(whoami)" "$GITHUB_WORKSPACE" || {
echo "::warning::sudo chown failed - attempting cleanup"
rm -rf "${GITHUB_WORKSPACE:?}"/* 2>/dev/null || true
rm -rf "${GITHUB_WORKSPACE:?}"/.[!.]* 2>/dev/null || true
}
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -546,7 +556,12 @@ jobs:
timeout-minutes: 180
steps:
- name: Fix workspace permissions
run: sudo chown -R "$(whoami)" "$GITHUB_WORKSPACE" 2>/dev/null || true
run: |
sudo chown -R "$(whoami)" "$GITHUB_WORKSPACE" || {
echo "::warning::sudo chown failed - attempting cleanup"
rm -rf "${GITHUB_WORKSPACE:?}"/* 2>/dev/null || true
rm -rf "${GITHUB_WORKSPACE:?}"/.[!.]* 2>/dev/null || true
}
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -574,7 +589,12 @@ jobs:
timeout-minutes: 180
steps:
- name: Fix workspace permissions
run: sudo chown -R "$(whoami)" "$GITHUB_WORKSPACE" 2>/dev/null || true
run: |
sudo chown -R "$(whoami)" "$GITHUB_WORKSPACE" || {
echo "::warning::sudo chown failed - attempting cleanup"
rm -rf "${GITHUB_WORKSPACE:?}"/* 2>/dev/null || true
rm -rf "${GITHUB_WORKSPACE:?}"/.[!.]* 2>/dev/null || true
}
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -602,7 +622,12 @@ jobs:
timeout-minutes: 180
steps:
- name: Fix workspace permissions
run: sudo chown -R "$(whoami)" "$GITHUB_WORKSPACE" 2>/dev/null || true
run: |
sudo chown -R "$(whoami)" "$GITHUB_WORKSPACE" || {
echo "::warning::sudo chown failed - attempting cleanup"
rm -rf "${GITHUB_WORKSPACE:?}"/* 2>/dev/null || true
rm -rf "${GITHUB_WORKSPACE:?}"/.[!.]* 2>/dev/null || true
}
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -638,7 +663,12 @@ jobs:
timeout-minutes: 180
steps:
- name: Fix workspace permissions
run: sudo chown -R "$(whoami)" "$GITHUB_WORKSPACE" 2>/dev/null || true
run: |
sudo chown -R "$(whoami)" "$GITHUB_WORKSPACE" || {
echo "::warning::sudo chown failed - attempting cleanup"
rm -rf "${GITHUB_WORKSPACE:?}"/* 2>/dev/null || true
rm -rf "${GITHUB_WORKSPACE:?}"/.[!.]* 2>/dev/null || true
}
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -683,7 +713,12 @@ jobs:
timeout-minutes: 180
steps:
- name: Fix workspace permissions
run: sudo chown -R "$(whoami)" "$GITHUB_WORKSPACE" 2>/dev/null || true
run: |
sudo chown -R "$(whoami)" "$GITHUB_WORKSPACE" || {
echo "::warning::sudo chown failed - attempting cleanup"
rm -rf "${GITHUB_WORKSPACE:?}"/* 2>/dev/null || true
rm -rf "${GITHUB_WORKSPACE:?}"/.[!.]* 2>/dev/null || true
}
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0