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
51 changes: 51 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
push:
branches:
- "feature/lab3"
workflow_dispatch:

jobs:
basic:
name: Basic CI info + system details
runs-on: ubuntu-latest

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

- name: Print workflow/run context
run: |
echo "Event: ${{ github.event_name }}"
echo "Repository: ${{ github.repository }}"
echo "Actor: ${{ github.actor }}"
echo "Ref: ${{ github.ref }}"
echo "SHA: ${{ github.sha }}"
echo "Run ID: ${{ github.run_id }}"
echo "Run number: ${{ github.run_number }}"
echo "Runner OS: ${{ runner.os }}"
echo "Runner Arch: ${{ runner.arch }}"
echo "Runner Name: ${{ runner.name }}"

- name: System information (OS/CPU/RAM/Disk)
shell: bash
run: |
set -euxo pipefail
echo "=== OS Release ==="
cat /etc/os-release || true

echo "=== Kernel ==="
uname -a

echo "=== CPU ==="
lscpu || true

echo "=== Memory ==="
free -h || true

echo "=== Disk ==="
df -h || true

echo "=== Top processes (optional) ==="
ps aux --sort=-%mem | head -n 10 || true
43 changes: 43 additions & 0 deletions labs/submission3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Lab 3 — CI/CD with GitHub Actions

## Task 1 — First GitHub Actions Workflow

Key concepts observed:
- **Workflow**: YAML automation stored in `.github/workflows/`.
- **Trigger (event)**: `push` automatically starts a run when commits are pushed.
- **Job**: A group of steps executed on the same runner VM.
- **Steps**: Individual commands/actions executed sequentially.
- **Runner**: The machine executing the job (GitHub-hosted runner via `runs-on`).




## Task 2 — Manual Trigger + System Information


### `.github/workflows/lab3-ci.yml`:

- Initial setup
- Manual trigger
- System information collection

### Gathered System Information from Runner

- Operating System: Ubuntu (ubuntu-latest GitHub-hosted runner)
- Kernel Version: Linux kernel version displayed via `uname -a`
- CPU Architecture: x86_64
- Memory: RAM size and usage displayed via free `-h`
- Disk Space: Available and used storage displayed via `df -h`

### Comparison of Manual vs Automatic Workflow Triggers

**Automatic Trigger**:
- Activated automatically when code is pushed to the repository.
- Event type shown in logs as: `push`.
- Used for continuous integration to validate changes immediately after commit.
- Ensures automated testing and validation without manual intervention.


**Manual Trigger (`workflow_dispatch`)**:
- Triggered manually via GitHub UI
- Event type shown in logs as: `workflow_dispatch`.