Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit f604c0a

Browse files
committed
s/Actions/actions, closes #2
1 parent 2ee1b28 commit f604c0a

35 files changed

+146
-146
lines changed

responses/01_explain-environment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Anatomy of GitHub Actions
22

3-
GitHub Actions is a unique world that lives alongside your repository. It is one made up of many moving parts and having a general understanding of these parts will help us understand the behavior we are going to program into our Action.
3+
GitHub Actions is a unique world that lives alongside your repository. It is one made up of many moving parts and having a general understanding of these parts will help us understand the behavior we are going to program into our action.
44

55
From 30,000 feet GitHub Actions is made up of the following components, with each component having its own complexities:
66

@@ -24,7 +24,7 @@ When a repository is configured with a **workflow** file, like we just created,
2424
1. Your GitHub repository listens for an event
2525
2. That event triggers a workflow run which starts a runner
2626
3. The runner, regardless of the hosting method, is responsible for carrying out the jobs which are defined.
27-
4. A job is series of steps, which can be Actions or commands
27+
4. A job is series of steps, which can be actions or commands
2828
5. When the steps complete a report is generated and can be viewed by anyone with access to the repository.
2929

3030

responses/01_explain-syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Let's take a second to talk about each of the pieces that we see here:
3737
- This is our first block of instructions. We are defining our first job for this workflow.
3838
- In this case, the job has been named `build`
3939
- We also define the runner for the job as `runs-on: ubuntu-latest`
40-
- Finally we define the steps for this job which can either rely on specific Actions, or run commands directly. As we can see there are three steps which show a mixed usage of Actions and Commands.
40+
- Finally we define the steps for this job which can either rely on specific actions, or run commands directly. As we can see there are three steps which show a mixed usage of actions and commands.
4141
- `uses: actions/checkout@v1`
4242
- ```
4343
name: Run a one-line script

responses/01_welcome-issue.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ Currently, there are **two** supported ways to create your own GitHub Actions:
2929
As you can see we aren't necessarily limited to JavaScript even though it is the focal point for this course.
3030

3131

32-
### Creating vs consuming Actions
32+
### Creating vs consuming actions
3333

3434
Although we are going to focus on creating and consuming a custom action, in this course we will also be consuming some actions that have been made public to us. Because your workflows will most likely do the same, I found it important to show you where to look for actions that already exist.
3535

3636
After all, for each time we need to reinvent the wheel for our specific use-case there are a handful of times when we are better off using a wheel that's already made!
3737

3838
- The [GitHub Actions Marketplace](https://github.com/marketplace?type=actions) is the primary place to find open-source actions that the community has written and released. Your action, should you choose to release it, could also reside here one day, ready to be consumed by the world!
3939
- The [GitHub Actions Repository](https://github.com/actions) is where you can find actions that are written by GitHub. We will leverage an action named `[checkout](https://github.com/actions/checkout)` from this repository as we go through this course. I'll explain more about what it does when we use it!
40-
- Your repositories may also contain **private actions** and they will most likely be located in the `.github/actions` directory in the root of your repository. **This is the convention we will be using as we learn how to create our own Action.**
40+
- Your repositories may also contain **private actions** and they will most likely be located in the `.github/actions` directory in the root of your repository. **This is the convention we will be using as we learn how to create our own action.**
4141

4242
### Using actions and Learning Lab
4343

responses/02_explain-steps.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
## Digging into a step
22

3-
As I mentioned earlier, a step is a task that is either an Action or a Command. This can be slightly confusing, so I want to take a little time to ensure I explain it to you before moving on.
3+
As I mentioned earlier, a step is a task that is either an action or a command. This can be slightly confusing, so I want to take a little time to ensure I explain it to you before moving on.
44

55
#### Actions
66

77
Actions are powerful. They are small programs written in either JavaScript or running inside of Docker containers, that add some functionality to your repository.
88

9-
The things you can do with Actions are limited only by your imagination. Want to send a tweet every time you tag a release? What about ordering 🍕just by creating an issue?
9+
The things you can do with actions are limited only by your imagination. Want to send a tweet every time you tag a release? What about ordering 🍕just by creating an issue?
1010

11-
Let's not forget the more practical usage of Actions, testing the source code of a repository or letting your team know that you are out of office 🏝 when they @ mention your name in issues or pull requests.
11+
Let's not forget the more practical usage of actions, testing the source code of a repository or letting your team know that you are out of office 🏝 when they @ mention your name in issues or pull requests.
1212

1313
You can define an action's inputs, outputs, and environment variables to create reusable building blocks for your workflow.
1414

15-
Actions are portable. You are free to publish your Actions to the [Actions Marketplace](https://github.com/marketplace?type=actions) where others can use your creation in their workflows! You can also share actions without publishing them to the marketplace by referencing the repository that contains the Actions code!
15+
Actions are portable. You are free to publish your actions to the [Actions Marketplace](https://github.com/marketplace?type=actions) where others can use your creation in their workflows! You can also share actions without publishing them to the marketplace by referencing the repository that contains the actions code!
1616

1717
Actions can even run commands 😏
1818

1919
📖Learn more [About Actions](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-actions)
2020

2121
#### Commands
2222

23-
Commands are useful in the own respect, but are much more limited than Actions.
23+
Commands are useful in the own respect, but are much more limited than actions.
2424

2525
Think about the tasks you might do from the command line of your local machine. Maybe you run `npm install` to install all of the dependencies for your project before running your unit tests. Maybe you run `docker build` to execute a Dockerfile.
2626

2727
You can accomplish the same set of tasks inside of a workflow but using `run` as a step in your job.
2828

2929
Commands are not easily shareable. There is no central location where you can consume the popular commands used in workflows. You do not have access to fine tuning the inputs, outputs or environment variables.
3030

31-
This does not mean commands offer no value in a workflow, but you should use them wisely and if you find yourself reusing the same commands repeatedly, consider turning them into Actions.
31+
This does not mean commands offer no value in a workflow, but you should use them wisely and if you find yourself reusing the same commands repeatedly, consider turning them into actions.

responses/02_modify-workflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Edit the current workflow
22

3-
Currently `my-workflow.yml` is not set up correctly for our use-case. It worked great for allowing us to take a high-level look at workflows, but if we want to use our custom Actions there are some changes that we have to make to it.
3+
Currently `my-workflow.yml` is not set up correctly for our use-case. It worked great for allowing us to take a high-level look at workflows, but if we want to use our custom actions there are some changes that we have to make to it.
44

55
### :keyboard: Activity: Modify my-workflow.yml to remove boilerplate steps
66

responses/02_workflow-results.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The right-hand panel shows real-time logging of the steps executed by the `build
1818

1919
GitHub Actions will **always** add the `Set up job` and `Complete job` steps to each job in a workflow. These steps are what configure the [virtual environment](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners) before running your steps and shut it down properly before moving onto the next job in your workflow.
2020

21-
If you recall, we had 1 step that used an Action and 2 steps that ran commands, can you identify which step used the Action?
21+
If you recall, we had 1 step that used an action and 2 steps that ran commands, can you identify which step used the action?
2222

2323
If you said `actions/checkout@v1` you'd be correct 😄!
2424

responses/03_reference-actions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Finishing the workflow
22

3-
@{{user.login}} you're doing great so far 😄! You've had to do a lot of workflow set up so we can begin writing custom Actions. We have just one more thing to add to our `my-workflow.yml` file before we get to the Action side of things.
3+
@{{user.login}} you're doing great so far 😄! You've had to do a lot of workflow set up so we can begin writing custom actions. We have just one more thing to add to our `my-workflow.yml` file before we get to the action side of things.
44

55
#### Recap
66

@@ -10,18 +10,18 @@ Before we make our final workflow change let's do a quick recap about what we've
1010
| ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1111
| Created `my-workflow.yml` inside of `.github/workflows` directory | GitHub repositories look in the `.github/workflows` folder for workflow files. |
1212
| Used a templated workflow | GitHub provides many templates for workflow files. This is a great spot to look when setting up a new workflow. If you can't find what you are looking for, you can always click the `setup a workflow yourself` button for a minimal starter template |
13-
| Workflow environment | You learned, from a high level, how a repository uses a workflow file to run commands or Actions based on triggers. You also learned that where these commands or Actions execute is something that can be specified |
13+
| Workflow environment | You learned, from a high level, how a repository uses a workflow file to run commands or actions based on triggers. You also learned that where these commands or actions execute is something that can be specified |
1414
| Workflow syntax | You were briefly introduced to the workflow YAML syntax. |
1515

1616
If that seems like a lot of things just to get started... well, it is! GitHub Actions is a robust platform designed to automate a wide range of tasks for your repositories.
1717

18-
If you'd like to see more examples of workflows and Actions then check out these Learning Lab courses all about GitHub Actions:
18+
If you'd like to see more examples of workflows and actions then check out these Learning Lab courses all about GitHub Actions:
1919

2020
- [GitHub Actions: Continuous Integration](https://lab.github.com/githubtraining/github-actions:-continuous-integration)
2121
- [GitHub Actions: Continuous Delivery](https://lab.github.com/githubtraining/github-actions:-continuous-delivery)
2222
- [GitHub Actions: Publish to GitHub Packages](https://lab.github.com/githubtraining/github-actions:-publish-to-github-packages)
2323

24-
### :keyboard: Activity: Modify my-workflow.yml to run our custom Action
24+
### :keyboard: Activity: Modify my-workflow.yml to run our custom action
2525

2626
1. [Edit]({{workflowFile}}) the `my-workflow.yml`.
2727
1. Add a new `step:` and `name:` it `hello-action`

responses/04_on-to-actions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Great Job 👍
22

3-
Your workflow is now set up to execute two Actions when any `push` event happens on this repository.
3+
Your workflow is now set up to execute two actions when any `push` event happens on this repository.
44

5-
For now, this workflow will fail. It fails because we have not yet created the `hello-world` Action, so this is expected.
5+
For now, this workflow will fail. It fails because we have not yet created the `hello-world` action, so this is expected.
66

7-
Head [over here]({{issueUrl}}) to get started in creating the `hello-world` Action!
7+
Head [over here]({{issueUrl}}) to get started in creating the `hello-world` action!

responses/05_create-metadata.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
## Enough talk, lets do this!
22

3-
Now that we know what Action metadata is, let's create the metadata for our current **hello-world** Action.
3+
Now that we know what action metadata is, let's create the metadata for our current **hello-world** action.
44

55
I will be doing this from within [Visual Studio Code](https://code.visualstudio.com/) and that will be reflected in the images that I show you. If you are using a different editor then your screen may look different.
66

77
### :keyboard: Activity: Create the metadata file
88

99
💡All of the following steps take place inside of the `.github/actions/hello-world` directory.
1010

11-
We will start with using the parameters that are **required** and later implement some optional parameters as our Action evolves.
11+
We will start with using the parameters that are **required** and later implement some optional parameters as our action evolves.
1212

1313
1. Create a file named `action.yml`
14-
2. Use the `name` parameter to name your Action `"my hello action"`
15-
3. Next, add a `description` parameter and give it a value of `"say hello with Actions"`
14+
2. Use the `name` parameter to name your action `"my hello action"`
15+
3. Next, add a `description` parameter and give it a value of `"say hello with GitHub Actions"`
1616
4. Lastly, define the `run` parameter to use `"node12"` to execute the `"main.js"`
1717

1818
<details><summary>View the complete file</summary>
1919

2020
```yaml
2121
name: "my hello action"
2222

23-
description: "say hello with Actions"
23+
description: "say hello with GitHub Actions"
2424

2525
runs:
2626
using: "node12"

responses/05_explain-metadata.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
## Action metadata
22

33
#### The failing workflow
4-
Before we jump into the details of Action metadata, it might be helpful to examine our workflow to understand the order that things happen. I have attached a screenshot below of the most recent workflow run, you can also follow along by clicking on the [Actions tab]({{actionsUrl}}) for your repository.
4+
Before we jump into the details of action metadata, it might be helpful to examine our workflow to understand the order that things happen. I have attached a screenshot below of the most recent workflow run, you can also follow along by clicking on the [Actions tab]({{actionsUrl}}) for your repository.
55

66
![](https://i.imgur.com/FPOjK3R.png)
77

8-
Notice that our third workflow step, the one that is looking for our Action is failing. We expect this, but the magic ✨is in the error message!
8+
Notice that our third workflow step, the one that is looking for our action is failing. We expect this, but the magic ✨is in the error message!
99

1010
That step is looking for a specific file, and in our case it's looking for the `action.yml` file. It's not looking for a JavaScript file or a `config.yml` file.
1111

1212
Because that file is non-existent in the `hello-world` directory we see this error. So let's start by talking about, and creating, that `action.yml` file.
1313

14-
#### The need to know of Action metadata
14+
#### The need to know of action metadata
1515

1616

1717
Every GitHub Action that we write needs to be accompanied by a metadata file. This file has a few rules to it, lets outline those now:
1818

1919
- Filename **must** be `action.yml`
20-
- Required for both Docker container and JavaScript Actions
20+
- Required for both Docker container and JavaScript actions
2121
- Written in YAML syntax
2222

23-
This file defines the following information about your Action:
23+
This file defines the following information about your action:
2424

2525

2626

2727
| Parameter | Description | Required |
2828
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------: |
29-
| Name | The name of your Action. Helps visually identify the Actions in a job. | :white_check_mark: |
30-
| Description | A summary of what your Action does. | :white_check_mark: |
29+
| Name | The name of your action. Helps visually identify the actions in a job. | :white_check_mark: |
30+
| Description | A summary of what your action does. | :white_check_mark: |
3131
| Inputs | Input parameters allow you to specify data that the action expects to use during runtime. These parameters become environment variables in the runner. ||
3232
| Outputs | Specifies the data that subsequent actions can use later in the workflow after the action that defines these outputs has run. ||
33-
| Runs | The command to run when the Action executes. | :white_check_mark: |
33+
| Runs | The command to run when the action executes. | :white_check_mark: |
3434
| Branding | You can use a color and Feather icon to create a badge to personalize and distinguish your action in GitHub Marketplace. ||
3535

3636
---

0 commit comments

Comments
 (0)