Script Valley
CI/CD with GitHub Actions
GitHub Actions Fundamentals/Assessment

Practice & Assessment

Test your understanding of GitHub Actions Fundamentals

Multiple Choice Questions

5
1

Where must a GitHub Actions workflow file be stored in a repository?

2

Which trigger allows you to run a workflow manually from the GitHub UI?

3

A job in a GitHub Actions workflow needs to build an iOS application. Which runner should it use?

4

What does pinning an action to @v4 instead of @main protect against?

5

Which key in a workflow step executes a shell command directly?

Coding Challenges

1
1

Create a Hello World Workflow

Create a GitHub repository and add a workflow file at .github/workflows/hello.yml. The workflow must: trigger on every push to the main branch, run on ubuntu-latest, have one job called greet, and print 'Hello from GitHub Actions!' using a run step. Verify the workflow runs successfully by checking the Actions tab. Expected output in logs: the string 'Hello from GitHub Actions!'. No external actions are required. Estimated time: 15 minutes.

Easy

Mini Project

1

First Automated Workflow for a Static Site

Initialize a repository containing a simple index.html file. Create a workflow that triggers on push to main and on pull_request to main. The workflow must have a single job running on ubuntu-latest with the following steps: check out the code using actions/checkout@v4, validate that index.html exists using a run step with a shell test command, and print the file size using wc -c. Add workflow_dispatch so you can run it manually. Trigger the workflow via a push and screenshot the successful run log. Use all concepts from this module: workflow file structure, triggers (push, pull_request, workflow_dispatch), runner selection, and using a pre-built action.

Easy