slimhub_actions/.github/workflows/check_ubuntu.yml
Rokib Hasan Sagar bcb163e267
Update check_ubuntu.yml
- Add PR Check
- More Debug Info
- Run on Push to Workflow File too

Signed-off-by: rokibhasansagar <10854164+rokibhasansagar@users.noreply.github.com>
2021-11-14 20:56:45 +06:00

41 lines
1.1 KiB
YAML

name: slimhub_actions Check on Ubuntu
on:
pull_request:
branches: [ main ]
paths:
- 'cleanup.sh'
push:
branches: [ main ]
paths:
- 'cleanup.sh'
- '.github/workflows/check_ubuntu.yml'
workflow_dispatch:
jobs:
cleanup:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
steps:
- uses: actions/checkout@main
- name: Raw Environment Apt Checkup
run: sudo apt list --installed
- name: Cleanups
run: |
chmod a+x ./cleanup.sh
bash ./cleanup.sh
- name: Post-Cleanup Apt Checkup
run: sudo apt list --installed
- name: Check Top 20 Storage-hungry APT Packages
run: |
printf " MB - Package Name\n================\n"
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}'
- name: Local Bin checks
run: ls -lAog /usr/local/bin
- name: Global Bin checks
run: ls -lAog /usr/bin
- name: Envirnment Variables Check
run: printenv | sort