Skip to content

Fix typos in .md files #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/steps/1-make-workflow-reusable.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

_Welcome to "Reusable Workflows and Matrix Strategies"! :wave:_

You can do a lot with GitHub Actions! You can automate repetitive tasks, build continuous integration and continuous deployment pipelines, and customize essentially any part of your software development workflow. It doesn't matter if you're just learning about workflows and GitHub Actions for the first time or you're well exerpienced with the process, you'll quickly find yourself repeating automation jobs and steps within the same workflow, and even using the dreaded copy and paste method for workflows across multiple repositories.
You can do a lot with GitHub Actions! You can automate repetitive tasks, build continuous integration and continuous deployment pipelines, and customize essentially any part of your software development workflow. It doesn't matter if you're just learning about workflows and GitHub Actions for the first time or you're well experienced with the process, you'll quickly find yourself repeating automation jobs and steps within the same workflow, and even using the dreaded copy and paste method for workflows across multiple repositories.

Is there a solution to reduce these repetitive tasks? Yes, I'm glad you asked :wink: Enter **reusable workflows**, a simple and powerful way to avoid copying and pasting workflows across your repositories.

Expand Down
2 changes: 1 addition & 1 deletion .github/steps/2-add-a-job.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Okay, now that we know what the reusable workflow is doing, let's now add a new
1. Navigate to the `.github/workflows/` folder and open the `my-starter-workflow.yml` file.
1. Add a new job to the workflow called `call-reusable-workflow`.
1. Add a `uses` command and path the command to the `reusable-workflow.yml` file.
1. Add a `with` command to pass in a `node` paramater and set the value to `14`.
1. Add a `with` command to pass in a `node` parameter and set the value to `14`.

```yaml
call-reusable-workflow:
Expand Down
4 changes: 2 additions & 2 deletions .github/steps/3-add-matrix-strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ To define a matrix strategy inside a job, you first need to define the matrix wi

The `example_matrix` job will run for each possible combination of the variables. So, in the above example, the workflow will run six jobs, one for each combination of the os and version variables. If you want to run a job for multiple versions, using a matrix strategy is a great solution over writing out 6 different jobs.

Let's add a matrix strategy to the **My Starter Workflow** so we can run our job on different versions of node instead of the hard-coded single verison of 14.
Let's add a matrix strategy to the **My Starter Workflow** so we can run our job on different versions of node instead of the hard-coded single version of 14.

### :keyboard: Activity: Use a matrix strategy to run multiple versions

1. In the same `my-starter-workflow.yml` file, add a `strategy` keyword under the `call-reusable-workflow` job.
1. Under `strategy`, add a `matrix` keyword.
1. Define the `nodeversion` variable to run over the following versions of node `[14, 16, 18, 20]`.
1. Replace the hard-coded `node` paramter of 14 used in the `with` command, and call the `nodeversion` in the matrix by using the following syntax `${{ matrix.nodeversion }}`. Below is that your job should look like:
1. Replace the hard-coded `node` parameter of 14 used in the `with` command, and call the `nodeversion` in the matrix by using the following syntax `${{ matrix.nodeversion }}`. Below is that your job should look like:

```yaml
call-reusable-workflow:
Expand Down
2 changes: 1 addition & 1 deletion .github/steps/5-trigger-the-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

_You're almost done. Last step! :heart:_

Now that the changes have been merged into the `main` branch, let's trigger the **My Starter Workflow** workflow to see everyting in action! But before we do, let's recall what we should expect to see before we run the workflow.
Now that the changes have been merged into the `main` branch, let's trigger the **My Starter Workflow** workflow to see everything in action! But before we do, let's recall what we should expect to see before we run the workflow.

- We should expect to see five jobs running from our \*My Starter Workflow\*\*. Do you remember which ones? We have the `build` job and then the `call-reusable-workflow` job that has the matrix strategy.
![Screen Shot 2022-09-08 at 9 53 52 AM](https://user-images.githubusercontent.com/6351798/189220189-97361a5e-eecf-4666-a859-e0587354bafe.png)
Expand Down