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
34 changes: 34 additions & 0 deletions .github/submissions/beginner-badge-kaveesha.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# πŸŽ“ Beginner Badge Submission - Kaveesha

## βœ… Task 1: Run Your First Workflow
- Successfully executed Hello World workflow manually
- Verified logs and outputs

πŸ“Έ Screenshot:
(Add your screenshot here)

---

## βœ… Task 2: Workflow Triggered by Push
- Modified workflow file
- Pushed changes to main branch
- Workflow triggered automatically

πŸ“Έ Screenshot:
(Add your screenshot here)

---

## βœ… Task 3: Local Build and Test
- Installed dependencies using npm install
- Ran tests using npm test
- Started server using npm start
- Verified API response on localhost

πŸ“Έ Screenshot:
(Add your screenshot here)

---

## πŸš€ Summary
All beginner tasks completed successfully.
Binary file added .github/submissions/screenshots/Tak-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/submissions/screenshots/Task2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/submissions/screenshots/task-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 24 additions & 12 deletions .github/workflows/hello-world.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,54 @@ name: Hello World Workflow

on:
push:
branches: [main, develop]
branches:
- main
- develop
workflow_dispatch:

jobs:
hello:
name: Say Hello
runs-on: ubuntu-latest

steps:
# Step 1: Checkout repository (BEST PRACTICE: first step)
- name: Checkout code
uses: actions/checkout@v4

# Step 2: Print hello message
- name: Print hello message
run: echo "πŸŽ‰ Hello from GitHub Actions!"


# Step 3: Print current time
- name: Print current time
run: date


# Step 4: Print GitHub runner info
- name: Print runner information
run: |
echo "Runner OS: ${{ runner.os }}"
echo "Runner Arch: ${{ runner.arch }}"
echo "GitHub SHA: ${{ github.sha }}"
echo "GitHub Ref: ${{ github.ref }}"
echo "Actor: ${{ github.actor }}"

- name: Check out code
uses: actions/checkout@v4


# Step 5: List repository files
- name: List files
run: ls -la

# Step 6: Access secret safely
- name: Access secret
env:
# We map the GitHub Secret to a local environment variable
MY_SECRET: ${{ secrets.TEST_SECRET }}
run: |
echo "Secret length: ${#MY_SECRET}"
echo "GitHub automatically masks secrets: $MY_SECRET"

if [ -z "$MY_SECRET" ]; then
echo "⚠️ Secret is NOT set"
else
echo "βœ… Secret is set (value hidden)"
echo "Secret length: ${#MY_SECRET}"
fi

# Step 7: Final success message
- name: Print success message
run: echo "βœ… Workflow completed successfully!"