You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Customize your workflow with environment variables and artifact data
4
4
metadata:
5
5
title: Customize your workflow with environment variables and artifact data
6
-
description: Learn how to use essential customization techniques such as using variables, running scripts, and sharing data and artifacts between jobs.
6
+
description: Learn how to use essential customization techniques like create variables, run scripts, and share data and artifacts between jobs.
Copy file name to clipboardExpand all lines: learn-pr/github/github-actions-ci/4-knowledge-check.yml
+38-38Lines changed: 38 additions & 38 deletions
Original file line number
Diff line number
Diff line change
@@ -14,69 +14,69 @@ content: |
14
14
quiz:
15
15
title: Check your knowledge
16
16
questions:
17
-
- content: "Artifacts from a GitHub Actions workflow can be saved with what action?"
17
+
- content: "What action do you use to save artifacts from a GitHub Actions workflow?"
18
18
choices:
19
-
- content: "The ```actions/upload-artifact``` action"
19
+
- content: "`actions/upload-artifact`"
20
20
isCorrect: true
21
-
explanation: "The ```actions/upload-artifact``` action allows you to save an artifact."
22
-
- content: "The ```actions/checkout@v3``` action"
21
+
explanation: "Use the `actions/upload-artifact` action to save an artifact."
22
+
- content: "`actions/checkout@v3`"
23
23
isCorrect: false
24
-
explanation: "The ```actions/upload-artifact``` action allows you to save an artifact. The ```actions/checkout@v3``` action copies the code from your repository into the virtual machine."
25
-
- content: "The ```actions/download-artifact``` action"
24
+
explanation: "Use the `actions/upload-artifact` action to save an artifact. The `actions/checkout@v3` action copies the code from your repository to a virtual machine."
25
+
- content: "`actions/download-artifact`"
26
26
isCorrect: false
27
-
explanation: "The ```actions/upload-artifact``` action allows you to save an artifact. The ```actions/download-artifact``` action allows you to download a saved artifact."
28
-
- content: "What is one way that GitHub Actions workflows can NOT be used?"
27
+
explanation: "Use the `actions/upload-artifact` action to save an artifact. Use the `actions/download-artifact` action to download a saved artifact."
28
+
- content: "Which of the following options is a way that you *can't* use GitHub Actions workflows?"
29
29
choices:
30
-
- content: "To automatically run test suites on each push"
30
+
- content: "Automatically run test suites on each push."
31
31
isCorrect: false
32
-
explanation: "You can use GitHub Actions workflows to do all of these tasks except upload secrets. You wouldn't want your secret in plain text in a workflow file."
33
-
- content: "To kick off a review process"
32
+
explanation: "You can use GitHub Actions workflows to do all these tasks except to *upload secrets*. You don't want your secret in plain text in a workflow file."
33
+
- content: "Kick off a review process."
34
34
isCorrect: false
35
-
explanation: "You can use GitHub Actions workflows to do all of these tasks except upload secrets. You wouldn't want your secret in plain text in a workflow file."
36
-
- content: "To automate common repetitive tasks, such as welcoming new contributors to a repository."
35
+
explanation: "You can use GitHub Actions workflows to do all these tasks except to *upload secrets*. You don't want your secret in plain text in a workflow file."
36
+
- content: "Automate common repetitive tasks, such as welcoming new contributors to a repository."
37
37
isCorrect: false
38
-
explanation: "You can use GitHub Actions workflows to do all of these tasks except upload secrets. You wouldn't want your secret in plain text in a workflow file."
39
-
- content: "To upload a new secret to GitHub Secrets."
38
+
explanation: "You can use GitHub Actions workflows to do all these tasks except to *upload secrets*. You don't want your secret in plain text in a workflow file."
39
+
- content: "Upload a new secret to GitHub Secrets."
40
40
isCorrect: true
41
-
explanation: "You can use GitHub Actions workflows to do all of these tasks except upload secrets. You wouldn't want your secret in plain text in a workflow file."
41
+
explanation: "Don't use GitHub Actions workflows to upload secrets. You don't want your secret in plain text in a workflow file."
42
42
- content: "Which action would you use to access a repository's code from the virtual machine provided by GitHub Actions?"
43
43
choices:
44
-
- content: "```actions/upload-artifact```"
44
+
- content: "`actions/upload-artifact`"
45
45
isCorrect: false
46
-
explanation: "The ```actions/upload-artifact``` action saves an artifact."
47
-
- content: "```actions/checkout```"
46
+
explanation: "The `actions/upload-artifact` action saves an artifact."
47
+
- content: "`actions/checkout`"
48
48
isCorrect: true
49
-
explanation: "The ```actions/checkout``` action accesses a repository's code from the virtual machine provided by GitHub Actions"
50
-
- content: "```npm install```"
49
+
explanation: "The `actions/checkout` action accesses a repository's code from the virtual machine provided by GitHub Actions."
50
+
- content: "`npm install`"
51
51
isCorrect: false
52
-
explanation: "The ```npm install``` command installs package and the dependencies."
53
-
- content: "```actions/setup-node```"
52
+
explanation: "The `npm install` command installs a package and its dependencies."
53
+
- content: "`actions/setup-node`"
54
54
isCorrect: false
55
-
explanation: "The ```actions/setup-node``` action sets up the correct version of Node."
56
-
- content: "How many builds will the following matrix produce? `os: [ubuntu-latest, windows-latest] node-version: [14.x, 16.x, 18.x]`"
55
+
explanation: "The `actions/setup-node` action sets up the correct version of Node.js."
56
+
- content: "How many builds does the following matrix produce? `os: [ubuntu-latest, windows-latest] node-version: [14.x, 16.x, 18.x]`"
57
57
choices:
58
-
- content: "6"
58
+
- content: "Six"
59
59
isCorrect: true
60
-
explanation: "Each operating system is paired with each version of Node for a total of 6 builds."
61
-
- content: "3"
60
+
explanation: "Each operating system is paired with each version of Node.js for a total of six builds."
61
+
- content: "Three"
62
62
isCorrect: false
63
-
explanation: "Each operating system is paired with each version of Node for a total of 6 builds."
64
-
- content: "5"
63
+
explanation: "Each operating system is paired with each version of Node.js for a total of six builds."
64
+
- content: "Five"
65
65
isCorrect: false
66
-
explanation: "Each operating system is paired with each version of Node for a total of 6 builds."
66
+
explanation: "Each operating system is paired with each version of Node.js for a total of six builds."
67
67
- content: "How can you pass data between jobs in a GitHub Actions workflow?"
68
68
choices:
69
-
- content: "By using the `needs` keyword"
69
+
- content: "By using the `needs` keyword."
70
70
isCorrect: false
71
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"
72
+
- content: "By using the `outputs` keyword."
73
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"
74
+
explanation: "You can use the `outputs` keyword to pass data between jobs in a GitHub Actions workflow."
75
+
- content: "By using the `env` keyword."
76
76
isCorrect: false
77
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"
78
+
- content: "By using the `secrets` keyword."
79
79
isCorrect: false
80
-
explanation: "The `secrets` keyword allows you to access secrets in a job, but it doesn't pass data between jobs."
80
+
explanation: "You can use the `secrets` keyword to access secrets in a job, but it doesn't pass data between jobs."
GitHub Actions can be used to implement *continuous integration* (CI) for code that is maintained in GitHub repositories. CI is the practice of using automation to build and test software every time a developer commits changes to version control. CI helps teams discover issues early in the development process and fix them quickly.
1
+
*Continuous integration (CI)*is the process of using automation to build and test software each time a developer commits changes to version control in a code base. CI helps teams discover issues early in the development process and fix them quickly. You can use GitHub Actions to implement CI for code that you maintain in a GitHub repository.
2
2
3
-
Suppose you want to set up a CI pipeline for your team. The team is developing a website to improve the experience customers have when they contact product support. A number of features are under development and you want to make sure the team can build and test them easily so that each one can be quickly added to the website. Because the code for the project is stored in a GitHub repository, you decide to use GitHub Actions for your CI project.
3
+
Suppose you want to set up a CI pipeline for your team of developers. The team is creating a website to improve the experience your customers have when they contact product support. Multiple features are under development. You want to make sure that the team can build and test all features easily so that each feature is quickly added to the website when it's ready. Because the code for the project is stored in a GitHub repository, you decide to use GitHub Actions for your CI project.
4
4
5
-
In this module, you learn how to implement continuous integration using GitHub Actions and workflows in your GitHub repositories.
5
+
In this module, you learn how to implement CI by using GitHub Actions and workflows in a GitHub repository. You build and test a Node.js project by using GitHub Actions and a workflow template. You customize your workflow by using GitHub Actions, and then you debug a failed test by using the GitHub Actions logs.
6
6
7
-
## Learning objectives
8
-
9
-
In this module, you:
10
-
11
-
- Build and test a Node.js project by using GitHub Actions and a templated workflow.
12
-
- Debug a failed test using the GitHub Actions Log.
13
-
- Customize your workflow with GitHub Actions.
14
-
15
-
## Prerequisites
16
-
17
-
- A GitHub account
18
-
- The ability to navigate and edit files in GitHub
19
-
- For more information about GitHub, see [Introduction to GitHub](https://github.com/githublearn/introduction-to-github).
20
-
- Basic familiarity with GitHub Actions and workflows
21
-
- If you're unfamiliar with GitHub Actions or workflows, check out [Automate development tasks by using GitHub Actions](/training/modules/github-actions-automate-tasks/)
7
+
To complete the module, you need basic familiarity with GitHub Actions and workflows. If you're unfamiliar with GitHub Actions or workflows, first check out [Automate development tasks by using GitHub Actions](/training/modules/github-actions-automate-tasks/).
0 commit comments