Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/lab3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Lab 3 — CI/CD Quickstart + System Info

on:
push:
branches:
- '**' # run on any branch push (including feature/lab3)
workflow_dispatch: # manual trigger from the Actions tab

jobs:
quickstart:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Hello from GitHub Actions
run: |
echo "👋 Hello from ${{ github.workflow }}!"
echo "Triggered by: ${{ github.event_name }}"
echo "Actor: ${{ github.actor }}"
echo "Branch/Ref: ${{ github.ref }}"
echo "Commit SHA: ${{ github.sha }}"

- name: Print environment summary
run: |
echo "Runner OS: ${{ runner.os }}"
echo "Job: ${{ github.job }}"
echo "Workflow run number: ${{ github.run_number }}"
echo "Workflow run ID: ${{ github.run_id }}"

- name: Gather system information
id: sysinfo
shell: bash
run: |
set -euxo pipefail
{
echo "# Runner system information"
date -u +"Collected at (UTC): %Y-%m-%dT%H:%M:%SZ"
echo "Runner.OS: ${{ runner.os }}"
echo "Runner.Name: ${{ runner.name }}"
echo "Runner.Arch: $(uname -m)"
echo

echo "## OS release"
if [ -f /etc/os-release ]; then cat /etc/os-release; else sw_vers || systeminfo || ver || true; fi
echo

echo "## Kernel"
uname -a || true
echo

echo "## CPU"
(command -v lscpu >/dev/null && lscpu) || (sysctl -a 2>/dev/null | grep -iE 'brand|cpu\.(core|thread)|machdep.cpu' || true) || (wmic cpu get name,NumberOfCores,NumberOfLogicalProcessors || true)
echo

echo "## Memory"
(free -h || vm_stat || (systeminfo | findstr /C:"Total Physical Memory") || true)
echo

echo "## Disk usage"
df -h || true

echo
echo "## Tools"
bash --version | head -n 1 || true
python3 --version || true
node --version || true
npm --version || true
} > system-info.txt
echo "file=system-info.txt" >> "$GITHUB_OUTPUT"

- name: Upload system-info artifact
uses: actions/upload-artifact@v4
with:
name: system-info
path: system-info.txt
if-no-files-found: error
retention-days: 7
Binary file added Lab11Submission.pdf
Binary file not shown.
2 changes: 2 additions & 0 deletions a.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hello
Line 2
2 changes: 2 additions & 0 deletions demo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
scratch
scratch
Loading