Challenge - 5 Problems
GitHub Actions Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Output of a GitHub Actions workflow run command
What is the output of the following GitHub Actions command when triggered in a workflow?
Git
echo "Hello from GitHub Actions!"
Attempts:
2 left
💡 Hint
Think about what the echo command does in a shell environment.
✗ Incorrect
The echo command prints the text string to the standard output, so the output will be exactly the string inside the quotes.
🧠 Conceptual
intermediate1:30remaining
Understanding GitHub Actions workflow triggers
Which event triggers a GitHub Actions workflow when a pull request is opened?
Attempts:
2 left
💡 Hint
Think about the event name that relates to pull requests.
✗ Incorrect
The 'pull_request' event triggers workflows when pull requests are opened, synchronized, or closed.
❓ Configuration
advanced2:00remaining
Correct syntax for a GitHub Actions job with multiple steps
Which option shows the correct YAML syntax for a job named 'build' with two steps: one to checkout code and one to run a script?
Git
name: CI
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:Attempts:
2 left
💡 Hint
Remember that each step is an item in a list with a dash and proper indentation.
✗ Incorrect
Each step must start with a dash at the same indentation level. Option D correctly lists two steps with proper indentation and keys.
❓ Troubleshoot
advanced2:00remaining
Diagnosing a failed GitHub Actions workflow due to missing permissions
A workflow fails with an error saying it cannot access the repository contents. What is the most likely cause?
Attempts:
2 left
💡 Hint
GitHub Actions requires explicit permissions to access repository contents.
✗ Incorrect
Since GitHub changed default permissions, workflows need 'permissions: contents: read' to access repo files. Missing this causes access errors.
🔀 Workflow
expert2:30remaining
Order of steps execution in a GitHub Actions job
Given a job with these steps, what is the order in which they execute?
Attempts:
2 left
💡 Hint
Steps run in the order they are listed in the YAML file.
✗ Incorrect
GitHub Actions executes steps sequentially from top to bottom in the order they appear.