upload vm detail using workflow #1056
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: list vm details | |
on: [workflow_dispatch, push, pull_request] | |
jobs: | |
test_job: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, ubuntu-20.04] | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.os }} | |
steps: | |
- name: list vm details | |
run: | | |
nproc | |
df -H | |
free -h | |
- name: Get System Information | |
run: | | |
lscpu > cpu-info.txt | |
free -h > memory-info.txt | |
df -h > disk-info.txt | |
shell: bash | |
- name: Upload System Information | |
uses: actions/upload-artifact@v2 | |
with: | |
name: system-info | |
path: | | |
cpu-info.txt | |
memory-info.txt | |
disk-info.txt | |
- name: Run commands | |
run: | | |
uname -a | |
arch | |
echo "sleeping for 5 minutes..." | |
sleep 5m | |
echo "wake up..." | |
- name: List Installed Packages | |
run: | | |
dpkg-query -W -f='${Package}\n' > installed-packages.txt | |
shell: bash | |
- name: Upload Installed Packages | |
uses: actions/upload-artifact@v2 | |
with: | |
name: installed-packages | |
path: installed-packages.txt |