Challenge - 5 Problems
GitHub Actions Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
GitHub Actions Workflow Trigger Output
You have a GitHub Actions workflow configured to trigger on
push events to the main branch only. What will happen if you push a commit to a branch named feature/login?Attempts:
2 left
💡 Hint
Check the event trigger conditions in the workflow YAML.
✗ Incorrect
The workflow is set to trigger only on push events to the main branch. Pushing to other branches like feature/login does not trigger it.
❓ Configuration
intermediate2:00remaining
Correct Syntax for a Job in GitHub Actions
Which of the following YAML snippets correctly defines a job named
build that runs on Ubuntu latest and executes a step to print 'Hello World'?Attempts:
2 left
💡 Hint
Check the exact keys required for jobs and steps in GitHub Actions YAML.
✗ Incorrect
The correct keys are 'runs-on' for the runner and 'steps' for the list of steps. Each step uses 'run' to execute commands.
🔀 Workflow
advanced2:30remaining
Sequential Job Execution in GitHub Actions
You want to create a workflow with two jobs:
build and test. The test job should run only after build completes successfully. Which configuration achieves this?Attempts:
2 left
💡 Hint
Look for the keyword that defines job dependencies in GitHub Actions.
✗ Incorrect
The 'needs' keyword specifies that the 'test' job depends on the successful completion of the 'build' job.
❓ Troubleshoot
advanced2:30remaining
Diagnosing a Failed GitHub Actions Workflow
A GitHub Actions workflow fails with the error:
Permission denied (publickey) when trying to push to the repository. What is the most likely cause?Attempts:
2 left
💡 Hint
Consider what is needed for GitHub Actions to push code back to the repo.
✗ Incorrect
To push code, the workflow needs authentication via SSH key or a token with write permissions. Missing or invalid credentials cause this error.
✅ Best Practice
expert3:00remaining
Optimizing CI/CD Workflow for Android Kotlin Project
Which practice best improves build speed and efficiency in a GitHub Actions workflow for an Android Kotlin project?
Attempts:
2 left
💡 Hint
Think about how to avoid downloading dependencies every time.
✗ Incorrect
Caching Gradle dependencies and build outputs reduces build time by reusing previously downloaded files and compiled outputs.