From b2e1d9cd36c80a5da2de6810ddf273fc48efa6a8 Mon Sep 17 00:00:00 2001 From: Tehnomant <159899170+Tehnomant@users.noreply.github.com> Date: Mon, 22 Sep 2025 23:03:29 +0300 Subject: [PATCH 1/4] Update github-actions-demo.yml Added manual trigger --- .github/workflows/github-actions-demo.yml | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index b00f8e94..655ca5aa 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -16,3 +16,34 @@ jobs: run: | ls ${{ github.workspace }} - run: echo "🍏 This job's status is ${{ job.status }}." + workflow_dispatch: + inputs: + logLevel: + description: 'Log level' + required: true + default: 'warning' + type: choice + options: + - info + - warning + - debug + print_tags: + description: 'True to print to STDOUT' + required: true + type: boolean + tags: + description: 'Test scenario tags' + required: true + type: string + environment: + description: 'Environment to run tests against' + type: environment + required: true + +jobs: + print-tag: + runs-on: ubuntu-latest + if: ${{ inputs.print_tags }} + steps: + - name: Print the input tag to STDOUT + run: echo The tags are ${{ inputs.tags }} From 6ac7baee4bdecad751a97999ce8856b27620f1ff Mon Sep 17 00:00:00 2001 From: Tehnomant <159899170+Tehnomant@users.noreply.github.com> Date: Mon, 22 Sep 2025 23:11:50 +0300 Subject: [PATCH 2/4] Update github-actions-demo.yml Changed manual trigger --- .github/workflows/github-actions-demo.yml | 50 ++++++++--------------- 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 655ca5aa..2353f1c1 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -1,6 +1,23 @@ name: GitHub Actions Demo run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 -on: [push] +on: + push: + branches: [ main, feature/lab3 ] + workflow_dispatch: + inputs: + environment: + description: 'Environment to run in' + required: true + default: 'staging' + type: choice + options: + - staging + - production + debug: + description: 'Enable debug mode' + required: false + type: boolean + jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest @@ -16,34 +33,3 @@ jobs: run: | ls ${{ github.workspace }} - run: echo "🍏 This job's status is ${{ job.status }}." - workflow_dispatch: - inputs: - logLevel: - description: 'Log level' - required: true - default: 'warning' - type: choice - options: - - info - - warning - - debug - print_tags: - description: 'True to print to STDOUT' - required: true - type: boolean - tags: - description: 'Test scenario tags' - required: true - type: string - environment: - description: 'Environment to run tests against' - type: environment - required: true - -jobs: - print-tag: - runs-on: ubuntu-latest - if: ${{ inputs.print_tags }} - steps: - - name: Print the input tag to STDOUT - run: echo The tags are ${{ inputs.tags }} From bb17ddf0dac56a4fb00562a41b91034882880994 Mon Sep 17 00:00:00 2001 From: Tehnomant <159899170+Tehnomant@users.noreply.github.com> Date: Mon, 22 Sep 2025 23:17:30 +0300 Subject: [PATCH 3/4] Update github-actions-demo.yml Added System Information Collection to workflow --- .github/workflows/github-actions-demo.yml | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 2353f1c1..5324b55e 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -32,4 +32,44 @@ jobs: - name: List files in the repository run: | ls ${{ github.workspace }} + - name: Gather System Information + run: | + echo "=== SYSTEM INFORMATION REPORT ===" + echo "" + echo "--- Operating System ---" + echo "OS: $(uname -s)" + echo "Kernel: $(uname -r)" + echo "Architecture: $(uname -m)" + echo "Hostname: $(hostname)" + echo "" + echo "--- Hardware Specifications ---" + echo "CPU Cores: $(nproc)" + echo "CPU Model: $(grep -m 1 'model name' /proc/cpuinfo | cut -d: -f2 | xargs)" + echo "Total Memory: $(free -h | grep Mem | awk '{print $2}')" + echo "Available Memory: $(free -h | grep Mem | awk '{print $7}')" + echo "" + echo "--- Disk Usage ---" + df -h + echo "" + echo "--- Runner Environment ---" + echo "Runner OS: ${{ runner.os }}" + echo "Runner Name: ${{ runner.name }}" + echo "Workspace: ${{ github.workspace }}" + echo "GitHub API URL: ${{ github.api_url }}" + echo "" + echo "--- Network Information ---" + echo "IP Address: $(hostname -I)" + echo "" + echo "--- Environment Variables ---" + echo "PATH: $PATH" + echo "USER: $(whoami)" + echo "Home: $HOME" + echo "" + echo "--- GitHub Context ---" + echo "Event: ${{ github.event_name }}" + echo "SHA: ${{ github.sha }}" + echo "Ref: ${{ github.ref }}" + echo "Actor: ${{ github.actor }}" + echo "Repository: ${{ github.repository }}" + echo "Workflow: ${{ github.workflow }}" - run: echo "🍏 This job's status is ${{ job.status }}." From c65ddfa45460c21560196c35d2e2e9816866eda1 Mon Sep 17 00:00:00 2001 From: Tehnomant Date: Mon, 22 Sep 2025 23:33:07 +0300 Subject: [PATCH 4/4] Completede submission3.md file --- submission3.md | 121 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 submission3.md diff --git a/submission3.md b/submission3.md new file mode 100644 index 00000000..feac77da --- /dev/null +++ b/submission3.md @@ -0,0 +1,121 @@ +## Task 1 — First GitHub Actions Workflow + +### Task 1.1 +### Key Concepts Learned: + +* **Workflows:** Automated procedures defined in YAML files stored in .github/workflows/ +* **Jobs:** Sets of steps that execute on the same runner +* **Steps:** Individual tasks that can run commands or actions +* **Runners:** Servers that run workflows +* **Triggers:** Events that cause workflows to run (push, pull_request, etc.) + +### Steps Followed: + +1. Created .github/workflows/ directory in repository +2. Created basic workflow YAML file +3. Defined workflow triggers and steps +4. Committed and pushed to trigger workflow + +### Task 1.2 + +**link to succesfull run:** https://github.com/Tehnomant/F25-DevOps-Intro/actions/runs/17926565018/job/50973957961 + +**What caused the run to trigger:** Pushing commits to the feature/lab3 branch + +### Workflow Execution Process Analysis: + +1. Commit push detected by GitHub +2. Workflow triggered based on on.push configuration +3. GitHub allocates a runner with specified OS (ubuntu-latest) +4. Steps execute sequentially: + + * Code checkout using official action + + * Shell commands to print system information +5. Each step's output logged in real-time +6. Workflow completes with success/failure status + +## Task 2 — Manual Trigger + System Information + +### Key Changes Made: + +* **Enhanced trigger configuration:** Added workflow_dispatch with input parameters +* **Specified branches:** Limited push triggers to main and feature/lab3 branches +* **Added system information step:** Comprehensive hardware and environment data collection +* **Input parameters for manual trigger:** Environment selection and debug mode options + +```text +=== SYSTEM INFORMATION REPORT === + +--- Operating System --- +OS: Linux +Kernel: 6.11.0-1018-azure +Architecture: x86_64 +Hostname: runnervmf4ws1 + +--- Hardware Specifications --- +CPU Cores: 4 +CPU Model: AMD EPYC 7763 64-Core Processor +Total Memory: 15Gi +Available Memory: 14Gi + +--- Disk Usage --- +Filesystem Size Used Avail Use% Mounted on +/dev/root 72G 46G 27G 64% / +tmpfs 7.9G 84K 7.9G 1% /dev/shm +tmpfs 3.2G 1.1M 3.2G 1% /run +tmpfs 5.0M 0 5.0M 0% /run/lock +/dev/sda16 881M 60M 760M 8% /boot +/dev/sda15 105M 6.2M 99M 6% /boot/efi +/dev/sdb1 74G 73G 0 100% /mnt +tmpfs 1.6G 12K 1.6G 1% /run/user/1001 + +--- Runner Environment --- +Runner OS: Linux +Runner Name: GitHub Actions 1000000008 +Workspace: /home/runner/work/F25-DevOps-Intro/F25-DevOps-Intro +GitHub API URL: https://api.github.com + +--- Network Information --- +IP Address: 10.1.0.77 172.17.0.1 + +--- Environment Variables --- +PATH: /snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin +USER: runner +Home: /home/runner + +--- GitHub Context --- +Event: workflow_dispatch +SHA: bb17ddf0dac56a4fb00562a41b91034882880994 +Ref: refs/heads/main +Actor: Tehnomant +Repository: Tehnomant/F25-DevOps-Intro +Workflow: GitHub Actions Demo +``` + +### Comparison of Manual vs Automatic Workflow Triggers +**Manual Trigger (workflow_dispatch):** +1. User-initiated via GitHub UI/API +2. Control Full user control over timing +3. Supports customizable inputs +4. Testing, deployments, maintenance + +**Automatic Trigger (push):** +1. Event-driven +2. Automated based on repository events +3. Uses event context data only +4. CI/CD, automated testing, quality gates + +### Performance Characteristics +* Multi-core Processing: 4 CPU cores enable true parallel task execution +* Ample Memory: 15GB RAM supports memory-intensive applications (containers, large builds) +* Fast Storage: SSD-based storage with 27GB available space +* Modern Kernel: Linux 6.11.0 + +### Capabilities Assessment + +* **Build Performance:** Capable of handling large codebases and complex dependency trees +* **Container Support:** Sufficient resources for Docker and containerized workflows +* **Parallel Testing:** 4 cores enable efficient parallel test execution +* **Memory-Intensive Tasks:** Can run databases, services, or large applications during testing +