Skip to content

Commit b391e1b

Browse files
authored
Merge pull request #50646 from camihmerhar/Infomagnus-Actions-Update-Manage-GitHub-Actions-in-Enterprise
Infomagnus actions update manage GitHub actions in enterprise
2 parents 7a689c2 + b6ae819 commit b391e1b

File tree

4 files changed

+153
-63
lines changed

4 files changed

+153
-63
lines changed

learn-pr/github/create-custom-github-actions/knowledge-check.yml

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ uid: learn.github.create-custom-github-actions.knowledge-check
33
title: Module assessment
44
metadata:
55
title: Module assessment
6-
description: Check what you've learned.
6+
description: Check what you learned.
77
ms.date: 01/30/2025
88
author: a-a-ron
99
ms.author: aastewar
@@ -28,31 +28,48 @@ quiz:
2828
- content: "Bash script"
2929
isCorrect: false
3030
explanation: "Bash scripts would either need to be run in Docker or as a parameter to a Run step."
31+
3132
- content: "Which keywords are required for a valid `action.yml` file?"
3233
choices:
33-
- content: "name, runs, composite"
34+
- content: "`name`, `runs`, `composite`"
3435
isCorrect: false
3536
explanation: "Composite isn't a required keyword for a valid `action.yml` file."
36-
- content: "name, runs, description"
37+
- content: "`name`, `runs`, `description`"
3738
isCorrect: true
3839
explanation: "These are the three required keywords for a valid `action.yml` file."
39-
- content: "name, description, branding"
40+
- content: "`name`, `description`, `branding`"
4041
isCorrect: false
4142
explanation: "Branding isn't a required keyword for a valid `action.yml` file."
42-
- content: "name, description, composite"
43+
- content: "`name`, `description`, `composite`"
4344
isCorrect: false
4445
explanation: "Composite isn't a required keyword for a valid `action.yml` file."
46+
4547
- content: "Which workflow command would set the debug message to **This is an error message**?"
4648
choices:
47-
- content: echo "::error::This is an error message"
49+
- content: "echo::error::This is an error message"
4850
isCorrect: true
4951
explanation: "This syntax is correct for this workflow command."
50-
- content: echo "error=This is an error message"
52+
- content: "echo error=This is an error message"
5153
isCorrect: false
52-
explanation: "This syntax is improper for a workflow command."
53-
- content: echo "::error::message=This is an error message"
54+
explanation: "This syntax is incorrect for a workflow command."
55+
- content: "echo::error::message=This is an error message"
5456
isCorrect: false
55-
explanation: "This syntax is improper for a workflow command."
56-
- content: echo "::error::This is an error message::"
57+
explanation: "This syntax is incorrect for a workflow command."
58+
- content: "echo::error::This is an error message::"
5759
isCorrect: false
58-
explanation: "This syntax is improper for a workflow command."
60+
explanation: "This syntax is incorrect for a workflow command."
61+
62+
- content: "Which file is used to define a composite action?"
63+
choices:
64+
- content: "Dockerfile"
65+
isCorrect: false
66+
explanation: "Dockerfiles are used for Docker container actions, not composite actions."
67+
- content: "action.yml"
68+
isCorrect: true
69+
explanation: "Composite actions are defined in an action.yml file, which specifies the inputs, outputs, and steps of the action."
70+
- content: "workflow.yml"
71+
isCorrect: false
72+
explanation: "workflow.yml files define workflows, not actions."
73+
- content: "package.json"
74+
isCorrect: false
75+
explanation: "package.json is used for JavaScript actions, not composite actions."

learn-pr/github/github-actions-automate-tasks/4-knowledge-check.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,31 @@ quiz:
5454
- content: "Opening an issue"
5555
isCorrect: false
5656
explanation: "Event triggers use Git references, and opening an issue produces a Git reference."
57+
- content: "What are the two types of manual events that can trigger a GitHub Actions workflow?"
58+
choices:
59+
- content: "workflow_run and push_manual"
60+
isCorrect: false
61+
explanation: "workflow_run is an event that triggers when another workflow completes, not a manual event. repository_run is not a valid GitHub Actions event."
62+
- content: "workflow_dispatch and repository_dispatch"
63+
isCorrect: true
64+
explanation: "GitHub Actions supports these two manual event triggers: workflow_dispatch allows manual triggering from the GitHub UI or API with customizable input parameters, and repository_dispatch enables workflows to be triggered by external systems via POST requests to the GitHub API."
65+
- content: "manual_run and external_trigger"
66+
isCorrect: false
67+
explanation: "Neither manual_run nor external_trigger are valid GitHub Actions event types."
68+
- content: "workflow_trigger and repository_webhook"
69+
isCorrect: false
70+
explanation: "workflow_trigger doesn't exist in GitHub Actions. While repository_webhook sounds similar to webhooks, the correct term for the external API-triggered event is repository_dispatch."
71+
- content: "What is the primary benefit of using GitHub's larger hosted runners?"
72+
choices:
73+
- content: "They provide additional CPU and memory resources for running resource-intensive jobs."
74+
isCorrect: true
75+
explanation: "Larger runners offer increased CPU and memory, allowing you to run workflows that require more resources than standard runners provide."
76+
- content: "GitHub's larger runners are available at no additional cost beyond standard runners."
77+
isCorrect: false
78+
explanation: "Larger runners incur additional costs based on their usage, unlike standard runners which may be included in your plan."
79+
- content: "Larger runners come with completely different pre-installed tools compared to standard runners."
80+
isCorrect: false
81+
explanation: "These larger runners maintain compatibility with existing workflows by including the same preinstalled tools as standard `ubuntu-latest` runners."
82+
- content: "Repository-level policies cannot be configured to control access to larger runners."
83+
isCorrect: false
84+
explanation: "To control access to larger runners, you can configure repository or organization-level policies, helping you manage costs and access effectively."

learn-pr/github/github-actions-ci/4-knowledge-check.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,19 @@ quiz:
6464
- content: "5"
6565
isCorrect: false
6666
explanation: "Each operating system is paired with each version of Node for a total of 6 builds."
67+
- content: "How can you pass data between jobs in a GitHub Actions workflow?"
68+
choices:
69+
- content: "By using the `needs` keyword"
70+
isCorrect: false
71+
explanation: "The `needs` keyword specifies the order in which jobs run, but it doesn't pass data between jobs."
72+
- content: "By using the `outputs` keyword"
73+
isCorrect: true
74+
explanation: "The `outputs` keyword allows you to pass data between jobs in a GitHub Actions workflow."
75+
- content: "By using the `env` keyword"
76+
isCorrect: false
77+
explanation: "The `env` keyword sets environment variables for a job, but it doesn't pass data between jobs."
78+
- content: "By using the `secrets` keyword"
79+
isCorrect: false
80+
explanation: "The `secrets` keyword allows you to access secrets in a job, but it doesn't pass data between jobs."
81+
82+

learn-pr/github/manage-github-actions-enterprise/knowledge-check.yml

Lines changed: 80 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ uid: learn.github.manage-github-actions-enterprise.knowledge-check
33
title: Module assessment
44
metadata:
55
title: Module assessment
6-
description: Check what you've learned.
6+
description: Check what you learned.
77
ms.date: 11/21/2024
88
author: a-a-ron
99
ms.author: aastewar
@@ -14,21 +14,6 @@ content: |
1414
quiz:
1515
title: Check your knowledge
1616
questions:
17-
- content: "Which of the following is a feature unique to GitHub Enterprise Cloud (GHEC)?"
18-
choices:
19-
- content: "Requires on-premises deployment and infrastructure management"
20-
isCorrect: false
21-
explanation: "Incorrect. This describes GitHub Enterprise Server (GHES), not GHEC. GHEC is hosted and managed by GitHub in the cloud."
22-
- content: "Provides centralized user management with identity provider integration"
23-
isCorrect: true
24-
explanation: "GHEC supports centralized user management and integrates with identity providers using SAML (for SSO) and SCIM (for user provisioning), which is a key feature of cloud-hosted enterprise solutions."
25-
- content: "Must be installed and maintained by the organization's IT team"
26-
isCorrect: false
27-
explanation: "Incorrect. GHEC is maintained by GitHub and requires no installation or infrastructure management by the organization."
28-
- content: "Operates entirely within a private cloud environment"
29-
isCorrect: false
30-
explanation: "Incorrect. GHEC operates in GitHub’s public cloud infrastructure, not a private cloud."
31-
3217
- content: "What actions can you take at enterprise level to manage the use of GitHub Actions in your enterprise instance?"
3318
choices:
3419
- content: "Create workflow templates"
@@ -48,65 +33,109 @@ quiz:
4833
explanation: "Correct. Custom labels can be used when you need to run jobs on runners that have specific capabilities."
4934
- content: "Add proxy configurations to your runners after they start."
5035
isCorrect: false
51-
explanation: "Incorrect. If you need a self-hosted runner to communicate with GitHub via a proxy server, you must add all proxy configurations to your runner before starting it."
36+
explanation: "Incorrect. You must add all proxy configurations to your runner before starting it."
5237
- content: "Add the IP address or IP address range of your runners at repository level."
5338
isCorrect: false
54-
explanation: "Incorrect. If your organization has configured an IP allowlist, you must add the IP address or IP address range of your self-hosted runners to the IP allowlist. IP allowlists are found in an organization's Settings."
39+
explanation: "Incorrect. This action is managed at the organization level in IP allowlists."
5540

5641
- content: "What are encrypted secrets?"
5742
choices:
58-
- content: "Encrypted secrets are authentication tokens you can generate in your account settings."
43+
- content: "Authentication tokens you can generate in your account settings."
5944
isCorrect: false
60-
explanation: "Incorrect. The authentication tokens you can create in your account settings are personal access tokens (PATs)."
61-
- content: "Encrypted secrets are the equivalent of SSH keys in GitHub."
45+
explanation: "Incorrect. This definition matches personal access tokens (PATs)."
46+
- content: "The equivalent of SSH keys in GitHub."
6247
isCorrect: false
63-
explanation: "Incorrect. SSH keys are also called SSH keys in GitHub."
64-
- content: "Encrypted secrets are encrypted environment variables you can create to store sensitive information."
48+
explanation: "Incorrect. SSH keys are separate and named accordingly."
49+
- content: "Encrypted environment variables for storing sensitive information."
6550
isCorrect: true
66-
explanation: "Correct. Once created, encrypted secrets become available for use in your workflows and actions at the level at which they were created (organization or repository)."
51+
explanation: "Correct. You can securely scope them by repository, organization, or environment."
6752

68-
- content: What is a key benefit of using **reusable workflows** in GitHub Actions?
53+
- content: "Which credential type poses the greatest security risk if used in GitHub Actions?"
6954
choices:
70-
- content: Prevents any external contributors from running workflows
55+
- content: "Repository deploy keys"
7156
isCorrect: false
72-
explanation: Reusable workflows improve standardization, but they do not automatically block external contributors. Security settings must be configured separately.
73-
- content: Reduces redundancy and maintenance overhead
57+
explanation: "Incorrect. These credentials are scoped and safer for single-repo use."
58+
- content: "Personal access token (classic)"
7459
isCorrect: true
75-
explanation: Reusable workflows help avoid repetitive configuration across multiple repositories, reducing maintenance effort.
76-
- content: Can only be used in the same repository where they are defined
60+
explanation: "Correct. These credentials have broad access, making them riskier."
61+
- content: "GitHub App tokens"
7762
isCorrect: false
78-
explanation: Reusable workflows can be referenced from a different repository, allowing broader reuse.
79-
- content: Automatically restricts all workflows to internal users
63+
explanation: "Incorrect. These credentials are more granular and preferred for security."
64+
- content: "GITHUB_TOKEN"
8065
isCorrect: false
81-
explanation: GitHub does not enforce internal-only workflow execution unless explicitly configured.
66+
explanation: "Incorrect. It is scoped and managed automatically."
8267

83-
- content: What is a primary benefit of using **GitHub-hosted runners** instead of self-hosted runners?
68+
- content: "Which feature enforces that tests pass before code can be merged?"
8469
choices:
85-
- content: Full control over hardware and software configuration
70+
- content: "Organization secrets"
8671
isCorrect: false
87-
explanation: Full control is a feature of self-hosted runners.
88-
- content: Ability to access internal/private networks
72+
explanation: "Incorrect. They handle credentials, not enforcement of tests."
73+
- content: "Repository rule sets"
74+
isCorrect: true
75+
explanation: "Correct. Rule sets can enforce status checks before merges."
76+
- content: "Workflow templates"
77+
isCorrect: false
78+
explanation: "Incorrect. These aid reuse, not enforcement."
79+
- content: "Runner groups"
80+
isCorrect: false
81+
explanation: "Incorrect. They help manage runners, not enforce rules."
82+
83+
- content: "Which of the following is unique to GitHub Enterprise Cloud (GHEC)?"
84+
choices:
85+
- content: "Requires on-premises infrastructure"
8986
isCorrect: false
90-
explanation: GitHub-hosted runners do not have direct access to internal networks.
91-
- content: Automatic updates for the OS and preinstalled packages
87+
explanation: "Incorrect. That describes GitHub Enterprise Server."
88+
- content: "Centralized user management with identity provider integration"
9289
isCorrect: true
93-
explanation: GitHub-hosted runners are automatically updated by GitHub, including OS patches and preinstalled tools.
94-
- content: Custom installation of non-standard software
90+
explanation: "Correct. GHEC integrates with identity providers using SAML (Security Assertion Markup Language)."
91+
- content: "IT teams must install it."
92+
isCorrect: false
93+
explanation: "Incorrect. GitHub hosts and manages GHEC."
94+
- content: "Runs in a private cloud"
9595
isCorrect: false
96-
explanation: Custom installation is supported with self-hosted runners, not GitHub-hosted ones.
96+
explanation: "Incorrect. GHEC runs on GitHub’s public cloud."
9797

98-
- content: What is the best practice when managing **encrypted secrets** in GitHub Actions?
98+
- content: "What is a key benefit of using reusable workflows?"
9999
choices:
100-
- content: Print secrets in workflow logs to assist with debugging
100+
- content: "Blocks external contributors automatically"
101101
isCorrect: false
102-
explanation: Secrets should never be exposed in logs.
103-
- content: Use the same secret across all repositories for consistency
102+
explanation: "Incorrect. Security must be separately configured."
103+
- content: "Reduces redundancy and maintenance overhead"
104+
isCorrect: true
105+
explanation: "Correct. Reusable workflows simplify workflow reuse."
106+
- content: "Only usable in the same repository"
107+
isCorrect: false
108+
explanation: "Incorrect. They can be reused across repositories."
109+
- content: "Restricts workflows to internal users"
110+
isCorrect: false
111+
explanation: "Incorrect. This behaviour is configurable, not default."
112+
113+
- content: "What is a benefit of using GitHub-hosted runners?"
114+
choices:
115+
- content: "Full control over hardware"
116+
isCorrect: false
117+
explanation: "Incorrect. That benefit is for self-hosted runners."
118+
- content: "Internal network access"
104119
isCorrect: false
105-
explanation: Sharing the same secret increases security risk and violates the principle of least privilege.
106-
- content: Limit access by defining secrets at the lowest necessary level
120+
explanation: "Incorrect. GitHub-hosted runners do not have this benefit."
121+
- content: "Automatic OS and package updates"
107122
isCorrect: true
108-
explanation: Scoping secrets appropriately minimizes exposure and enhances security.
109-
- content: Store secrets in the GitHub Actions log archive
123+
explanation: "Correct. GitHub maintains hosted runner environments."
124+
- content: "Install custom software"
110125
isCorrect: false
111-
explanation: Storing secrets in logs is unsafe and not a recommended practice.
126+
explanation: "Incorrect. That feature is supported on self-hosted runners."
112127

128+
- content: "What is a best practice for managing encrypted secrets?"
129+
choices:
130+
- content: "Print them in logs for debugging"
131+
isCorrect: false
132+
explanation: "Incorrect. Never expose secrets in logs."
133+
- content: "Reuse the same secret across all repos"
134+
isCorrect: false
135+
explanation: "Incorrect. This increases risk."
136+
- content: "Scope secrets to the lowest level needed"
137+
isCorrect: true
138+
explanation: "Correct. This limits exposure."
139+
- content: "Store secrets in archived workflow logs"
140+
isCorrect: false
141+
explanation: "Incorrect. That approach is a security vulnerability."

0 commit comments

Comments
 (0)