Update check_ubuntu.yml
- Detailed debug info extraction for Preparation of New Update Signed-off-by: rokibhasansagar <10854164+rokibhasansagar@users.noreply.github.com>
This commit is contained in:
parent
2136f0ea78
commit
2d355953a3
1 changed files with 59 additions and 14 deletions
73
.github/workflows/check_ubuntu.yml
vendored
73
.github/workflows/check_ubuntu.yml
vendored
|
@ -10,32 +10,77 @@ on:
|
||||||
paths:
|
paths:
|
||||||
- 'cleanup.sh'
|
- 'cleanup.sh'
|
||||||
- '.github/workflows/check_ubuntu.yml'
|
- '.github/workflows/check_ubuntu.yml'
|
||||||
|
schedule:
|
||||||
|
- cron: '1 1 1 * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cleanup:
|
cleanup:
|
||||||
|
if: github.repository == 'rokibhasansagar/slimhub_actions'
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-18.04, ubuntu-20.04]
|
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: 'main'
|
||||||
- name: Raw Environment Apt Checkup
|
- name: Raw Environment Apt Checkup
|
||||||
run: sudo apt list --installed
|
run: |
|
||||||
|
echo "::group:: List Area"
|
||||||
|
sudo apt list --installed | sed '1d' | tee -a apt.preinstalled.raw.${{matrix.os}}.list
|
||||||
|
echo "::endgroup::"
|
||||||
|
echo "::group:: dpkg-query Debug Area"
|
||||||
|
dpkg-query -Wf 'Package: ${Package}\nSynopsis: ${binary:Summary}\nVersion: ${Version}\nISize: ${Installed-Size}\nPre-Depends: ${Pre-Depends}\nDepends: ${Depends}\n\n' | sed -e '/^Synopsis: $/d;/^Version: $/d;/^ISize: $/d;/^Pre-Depends: $/d;/^Depends: $/d' | tee -a apt.dependencies.${{matrix.os}}.list
|
||||||
|
echo "::endgroup::"
|
||||||
|
echo "::group:: Log Download Area"
|
||||||
|
for i in apt.preinstalled.raw.${{matrix.os}}.list apt.dependencies.${{matrix.os}}.list; do
|
||||||
|
tar -I'zstd --ultra -22 -T2' -cf "${i}.tzst" "${i}" && rm "${i}"
|
||||||
|
curl -s --upload-file "${i}.tzst" https://transfer.sh/ && echo
|
||||||
|
done
|
||||||
|
echo "::endgroup::"
|
||||||
- name: Cleanups
|
- name: Cleanups
|
||||||
run: |
|
run: |
|
||||||
chmod a+x ./cleanup.sh
|
sed '11,18d' ./cleanup.sh | bash 2>&1
|
||||||
bash ./cleanup.sh
|
|
||||||
- name: Post-Cleanup Apt Checkup
|
- name: Post-Cleanup Apt Checkup
|
||||||
run: sudo apt list --installed
|
|
||||||
- name: Check Top 20 Storage-hungry APT Packages
|
|
||||||
run: |
|
run: |
|
||||||
printf " MB - Package Name\n================\n"
|
echo "::group:: List Area"
|
||||||
dpkg-query -Wf '${db:Status-Status} ${Installed-Size}\t${Package}\n' | sed -ne 's/^installed //p' | sort -rh 2>/dev/null | head -n20 | awk '{print $1/1024, $2}'
|
sudo apt list --installed | sed '1d' | tee -a apt.postinstalled.raw.${{matrix.os}}.list
|
||||||
- name: Local Bin checks
|
echo "::endgroup::"
|
||||||
run: ls -lAog /usr/local/bin
|
echo "::group:: dpkg-query Debug Area"
|
||||||
- name: Global Bin checks
|
dpkg-query -Wf 'Package: ${Package}\nSynopsis: ${binary:Summary}\nVersion: ${Version}\nISize: ${Installed-Size}\nPre-Depends: ${Pre-Depends}\nDepends: ${Depends}\n\n' | sed -e '/^Synopsis: $/d;/^Version: $/d;/^ISize: $/d;/^Pre-Depends: $/d;/^Depends: $/d' | tee -a apt.postdependencies.${{matrix.os}}.list
|
||||||
run: ls -lAog /usr/bin
|
echo "::endgroup::"
|
||||||
|
echo "::group:: Log Download Area"
|
||||||
|
for i in apt.postinstalled.raw.${{matrix.os}}.list apt.postdependencies.${{matrix.os}}.list; do
|
||||||
|
tar -I'zstd --ultra -22 -T2' -cf "${i}.tzst" "${i}" && rm "${i}"
|
||||||
|
curl -s --upload-file "${i}.tzst" https://transfer.sh/ && echo
|
||||||
|
done
|
||||||
|
echo "::endgroup::"
|
||||||
|
- name: Check Top 30 Storage-hungry APT Packages
|
||||||
|
run: |
|
||||||
|
echo "::group:: dpkg-query Debug Area"
|
||||||
|
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -rh 2>/dev/null | head -n30 | awk '{print $2}' >apt.hugeapps.names.${{matrix.os}}.list
|
||||||
|
cat apt.hugeapps.names.${{matrix.os}}.list | while read -r i; do
|
||||||
|
dpkg-query -f='Package: ${Package}\nSynopsis: ${binary:Summary}\nVersion: ${Version}\nISize: ${Installed-Size}\nPre-Depends: ${Pre-Depends}\nDepends: ${Depends}\n\n' -W "${i}" | sed -e '/^Synopsis: $/d;/^Version: $/d;/^ISize: $/d;/^Pre-Depends: $/d;/^Depends: $/d' | tee -a apt.hugeappsdependencies.${{matrix.os}}.list
|
||||||
|
done
|
||||||
|
echo "::endgroup::"
|
||||||
|
echo "::group:: Log Download Area"
|
||||||
|
tar -I'zstd --ultra -22 -T2' -cf "apt.hugeappsdependencies.${{matrix.os}}.list.tzst" "apt.hugeappsdependencies.${{matrix.os}}.list"
|
||||||
|
curl -s --upload-file "apt.hugeappsdependencies.${{matrix.os}}.list.tzst" https://transfer.sh/ && echo
|
||||||
|
echo "::endgroup::"
|
||||||
|
- name: Local & Global Bin checks
|
||||||
|
run: |
|
||||||
|
echo "::group:: Debug Area"
|
||||||
|
ls -lAog /usr/local/bin 2>&1 | tee -a bin.local.list
|
||||||
|
ls -lAog /usr/bin 2>&1 | tee -a bin.global.list
|
||||||
|
echo "::group:: Log Download Area"
|
||||||
|
tar -I'zstd --ultra -22 -T2' -cf bin.checklists.${{matrix.os}}.tzst bin.local.list bin.global.list
|
||||||
|
curl -s --upload-file bin.checklists.${{matrix.os}}.tzst https://transfer.sh/ && echo
|
||||||
|
echo "::endgroup::"
|
||||||
- name: Envirnment Variables Check
|
- name: Envirnment Variables Check
|
||||||
run: printenv | sort
|
run: |
|
||||||
|
printenv | sort >envs.checklists.list
|
||||||
|
tar -I'zstd --ultra -22 -T2' -cf envs.checklists.${{matrix.os}}.tzst envs.checklists.list
|
||||||
|
curl -s --upload-file envs.checklists.${{matrix.os}}.tzst https://transfer.sh/ && echo
|
||||||
|
|
Loading…
Reference in a new issue