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

Commit 2e4a237

Browse files
authored
Merge pull request #5 from githubtraining/activity-titles
Match step titles to activities
2 parents 5021de1 + da85feb commit 2e4a237

26 files changed

+180
-123
lines changed

config.yml

Lines changed: 47 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ description: >-
55
template:
66
repo: 'write-docker-actions-template'
77
name: 'write-docker-actions'
8+
tags:
9+
- Docker
10+
- Containers
11+
- Workflows
12+
- Application programming interface (API)
13+
- Publishing GitHub Actions
814

915
# Repo artifacts
1016
# 1. (Issue) Start here!
@@ -82,8 +88,8 @@ steps:
8288
data:
8389
workflowFile: '%payload.repository.html_url%/edit/%payload.pull_request.head.ref%/.github/workflows/my-workflow.yml'
8490

85-
- title: Add an Action reference
86-
description: Add an Action reference to the workflow file
91+
- title: Edit the current workflow
92+
description: Remove boilerplate steps from `my-workflow.yml`
8793
event: pull_request.synchronize
8894
link: '{{ repoUrl }}/pull/2'
8995
actions:
@@ -104,8 +110,8 @@ steps:
104110
data:
105111
workflowFile: '%payload.repository.html_url%/edit/%actions.workflowPr.data.head.ref%/.github/workflows/my-workflow.yml'
106112

107-
- title: Creating the Action metadata
108-
description: Create an action.yml file and add necessary metatdata for our Action
113+
- title: Add an action reference to the workflow
114+
description: Reference our custom action from `my-workflow.yml`
109115
event: pull_request.synchronize
110116
link: '{{ repoUrl }}/pull/2'
111117
actions:
@@ -137,8 +143,8 @@ steps:
137143
pullRequest: Create my first workflow
138144
- type: mergePullRequest
139145

140-
- title: Creating the action logic
141-
description: Adding source code to the action
146+
- title: Create the action metadata
147+
description: Create an `action.yml` file and add necessary metadata
142148
event:
143149
- pull_request.opened
144150
- pull_request.edited
@@ -172,8 +178,8 @@ steps:
172178
- type: closeIssue
173179
issue: Your first Docker based action
174180

175-
- title: Create the action Dockerfile
176-
description: Creat a Dockerfile containing the actions source code
181+
- title: Write the Hello World source code
182+
description: Create `main.go` containing the Hello World source code
177183
event: pull_request.synchronize
178184
link: '{{ repoUrl }}/pull/4'
179185
actions:
@@ -221,8 +227,8 @@ steps:
221227
actionsUrl: '%payload.repository.html_url%/actions'
222228
quicklink: '%payload.repository.html_url%/new/%payload.pull_request.head.ref%?filename=.github/actions/hello-world/Dockerfile'
223229

224-
- title: Adding input parameters to metadata
225-
description: extend your action to accept input parameters
230+
- title: Create the action's `Dockerfile`
231+
description: Create a `Dockerfile` containing the Docker instructions
226232
event: pull_request.synchronize
227233
link: '{{ repoUrl }}/pull/4'
228234
actions:
@@ -276,8 +282,8 @@ steps:
276282
data:
277283
quicklink: '%payload.repository.html_url%/edit/%payload.pull_request.head.ref%/.github/actions/hello-world/action.yml'
278284

279-
- title: Adding input parameters to source code files
280-
description: extend your action to accept input parameters
285+
- title: Add input parameters to Hello World's metadata
286+
description: Update `action.yml` to accept input parameters for Hello World
281287
event: pull_request.synchronize
282288
link: '{{ repoUrl }}/pull/4'
283289
actions:
@@ -295,8 +301,8 @@ steps:
295301
data:
296302
quicklink: '%payload.repository.html_url%/edit/%payload.pull_request.head.ref%/.github/actions/hello-world/main.go'
297303

298-
- title: Using input parameters in the workflow
299-
description: Assign values to the newly created input parameters
304+
- title: Use input parameters in the source code
305+
description: Extend Hello World's source code to accept the input parameters
300306
event: pull_request.synchronize
301307
link: '{{ repoUrl }}/pull/4'
302308
actions:
@@ -314,8 +320,8 @@ steps:
314320
data:
315321
quicklink: '%payload.repository.html_url%/edit/%payload.pull_request.head.ref%/.github/workflows/my-workflow.yml'
316322

317-
- title: Exploring your input parameters
318-
description: view the results of adding input parameter
323+
- title: Use input parameters in the workflow
324+
description: Assign values to the newly created input parameters in `my-workflow.yml`
319325
event: pull_request.synchronize #ideally would like workflow complete to trigger this
320326
link: '{{ repoUrl }}/pull/4'
321327
actions:
@@ -336,8 +342,8 @@ steps:
336342
- type: respond
337343
with: 08_experiment.md
338344

339-
- title: Integrating actions with external APIs
340-
description: Write a new action that calls an external API
345+
- title: Explore your input parameters
346+
description: View the results of changing input parameters
341347
event: pull_request.closed
342348
link: '{{ repoUrl }}/pull/4'
343349
actions:
@@ -369,7 +375,7 @@ steps:
369375
data:
370376
issueUrl: '%actions.catFact.data.html_url%'
371377

372-
- title: Create your new Action metadata
378+
- title: Setting up the next action
373379
description: Comment out the lines in the workflow to prevent unwanted runs
374380
event:
375381
- pull_request.opened
@@ -401,8 +407,8 @@ steps:
401407
data:
402408
quicklink: '%payload.repository.html_url%/new/%payload.pull_request.head.ref%?filename=.github/actions/cat-facts/action.yml'
403409

404-
- title: Create your action's source code files
405-
description: Add main.py to your Action
410+
- title: Add metadata to the cat-fats action
411+
description: Create the cat-facts metadata file
406412
event: pull_request.synchronize
407413
link: '{{ repoUrl }}/pull/6'
408414
actions:
@@ -449,8 +455,8 @@ steps:
449455
data:
450456
quicklink: '%payload.repository.html_url%/new/%payload.pull_request.head.ref%?filename=.github/actions/cat-facts/src/main.py'
451457

452-
- title: Add Python dependencies
453-
description: Add the requirements.txt file
458+
- title: Fetch a cat fact
459+
description: Create the Python source code for the cat-fats action
454460
event: pull_request.synchronize
455461
link: '{{ repoUrl }}/pull/6'
456462
actions:
@@ -497,8 +503,8 @@ steps:
497503
data:
498504
quicklink: '%payload.repository.html_url%/new/%payload.pull_request.head.ref%?filename=.github/actions/cat-facts/requirements.txt'
499505

500-
- title: Create the Dockerfile for the action
501-
description: Add the Dockerfile to the action
506+
- title: Add Python dependencies
507+
description: Create `requirements.txt` with your Python dependencies
502508
event: pull_request.synchronize
503509
link: '{{ repoUrl }}/pull/6'
504510
actions:
@@ -545,8 +551,8 @@ steps:
545551
data:
546552
quicklink: '%payload.repository.html_url%/new/%payload.pull_request.head.ref%?filename=.github/actions/cat-facts/Dockerfile'
547553

548-
- title: Use the cat fact action in a workflow
549-
description: Edit the workflow file to now use the newly created cat fact action
554+
- title: Add the cat-fact `Dockerfile`
555+
description: Create `Dockerfile` for the cat-fat action
550556
event: pull_request.synchronize
551557
link: '{{ repoUrl }}/pull/6'
552558
actions:
@@ -597,8 +603,8 @@ steps:
597603
workflowFile: '%payload.repository.html_url%/edit/%actions.apiPr.data.head.ref%/.github/workflows/my-workflow.yml'
598604
actionsUrl: '%payload.repository.html_url%/actions'
599605

600-
- title: Having actions teach us about cats
601-
description: Trigger your workflow to get cat facts
606+
- title: Use the cat-fat action
607+
description: Restore the workflow file
602608
event: pull_request.synchronize
603609
link: '{{ repoUrl }}/pull/6'
604610
actions:
@@ -618,8 +624,8 @@ steps:
618624
data:
619625
actionsUrl: '%payload.repository.html_url%/actions'
620626

621-
- title: Configure the workflow for a third Action
622-
description: Edit the workflow to accomodate the third action
627+
- title: Get ready to purr
628+
description: Trigger a cat fact
623629
event: pull_request.closed
624630
link: '{{ repoUrl }}/pull/6'
625631
actions:
@@ -649,8 +655,8 @@ steps:
649655
data:
650656
issueUrl: '%actions.outputIssue.data.html_url%'
651657

652-
- title: Write the final Action
653-
description: Create an Action that consumes output from another Action and uses the JavaScript actions toolkit
658+
- title: Reference the issue-maker action
659+
description: Reference issue-maker in the `my-workflow.yml`
654660
event:
655661
- pull_request.opened
656662
- pull_request.edited
@@ -681,8 +687,8 @@ steps:
681687
data:
682688
quicklink: '%payload.repository.html_url%/new/%payload.pull_request.head.ref%?filename=.github/actions/issue-maker/package.json'
683689

684-
- title: Add third Actions metadata
685-
description: Create the metadata for the third Action
690+
- title: Add dependencies for issue-maker action
691+
description: Add `package.json` to issue-maker
686692
event: pull_request.synchronize
687693
link: '{{ repoUrl }}/pull/8'
688694
actions:
@@ -729,8 +735,8 @@ steps:
729735
data:
730736
quicklink: '%payload.repository.html_url%/new/%payload.pull_request.head.ref%?filename=.github/actions/issue-maker/action.yml'
731737

732-
- title: Add third Actions JavaScript files
733-
description: Create the JavaScript files for the third Action
738+
- title: Create the issue-maker's action metadata
739+
description: Add `action.yml` for issue-maker
734740
event: pull_request.synchronize
735741
link: '{{ repoUrl }}/pull/8'
736742
actions:
@@ -777,8 +783,8 @@ steps:
777783
data:
778784
quicklink: '%payload.repository.html_url%/new/%payload.pull_request.head.ref%?filename=.github/actions/issue-maker/src/index.js'
779785

780-
- title: Create the final actions Dockerfile
781-
description: Add a pull request label to trigger the workflow
786+
- title: Add the issue-maker action's source code
787+
description: Add `src/index.js` for issue-maker
782788
event: pull_request.synchronize
783789
link: '{{ repoUrl }}/pull/8'
784790
actions:
@@ -825,8 +831,8 @@ steps:
825831
data:
826832
quicklink: '%payload.repository.html_url%/new/%payload.pull_request.head.ref%?filename=.github/actions/issue-maker/Dockerfile'
827833

828-
- title: Trigger the third Action
829-
description: Add a pull request label to trigger the workflow
834+
- title: Add the issue-maker action's `Dockerfile`
835+
description: Create `Dockerfile` for issue-maker
830836
event: pull_request.synchronize
831837
link: '{{ repoUrl }}/pull/8'
832838
actions:

course-details.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
[GitHub Actions](https://github.com/features/actions) is a powerful platform that empowers your team to go from code to cloud all from the comfort of your own repositories.
22

3-
Over the duration of this course, approximately 1 hour, you will learn the skills needed to begin using and customizing GitHub Actions to fit your unique workflow scenarios.
3+
This course will teach you the skills needed to begin using and customizing Docker container based actions to fit your unique workflow scenarios.
44

55
## What you'll learn
66

7-
In this course you will learn how to:
7+
After completing this course, you will be able to:
88

99
- Consume actions within a workflow file
10-
- Create custom Docker based actions
10+
- Create custom Docker container based actions
11+
- Create actions in your programming language of choice
12+
- Leverage an external API within an action
13+
- Set and use input parameters for actions
1114
- Publish your newly created action to the marketplace
1215

1316
You'll know the answers to questions like:
@@ -18,31 +21,36 @@ You'll know the answers to questions like:
1821
- What is a `Dockerfile`?
1922
- What are GitHub Actions capable of?
2023
- What programming languages can I write GitHub Actions in?
24+
- How do I publish an action?
25+
- How do I customize my action's behavior based on inputs?
2126

2227
## What you'll build
2328

29+
![screenshot of three actions: issue-maker, hello-world, and cat-facts](https://user-images.githubusercontent.com/16547949/77695797-b87f3f00-6f82-11ea-8131-9d362cfc1e4b.png)
30+
2431
In this course you will build three actions that each accomplish different tasks designed to demonstrate the flexibility of creating and consuming Docker Based Actions.
2532

26-
First, you will start with the traditional "Hello World!" program which will teach you where to find the output of a workflow run. You will then modify this "Hello World!" action to accept `input` parameters which allow the action to be more dynamic. This action will be written using the Go programming language.
33+
1. **Hello, world!** You will start with the traditional "Hello, world!" program which will teach you where to find the output of a workflow run. You will then modify this "Hello World!" action to accept `input` parameters which allow the action to be more dynamic. This action will be written using the Go programming language.
2734

28-
Second, you will write an action that call upon an external API to retrieve a fact about cats and prints it to the workflows output. You will then modify this cat fact action to set the retrieved data as `output` for another action in the workflow to consume. This action will be written using the Python programming language.
35+
2. **Cat facts** You will write an action that call upon an external API to retrieve a fact about cats and prints it to the workflows output. You will then modify this cat fact action to set the retrieved data as `output` for another action in the workflow to consume. This action will be written using the Python programming language.
2936

30-
Lastly, you will write a third action that will open an issue in your repository making the cat fact available to everyone. You will learn how to use the `output` of previous actions as `input` for current actions in this step. This action will be written using the JavaScript programming language.
37+
3. **Issue maker** You will open an issue in your repository making the cat fact available to everyone. You will learn how to use the `output` of previous actions as `input` for current actions in this step. This action will be written using the JavaScript programming language.
3138

3239
## Prerequisites
3340

34-
We will be using the GitHub UI to build and consume our actions. Since this is a course on [Docker](https://docs.docker.com/get-started/) based actions, having a basic understanding of Docker is recommended.
41+
We recommend you first take the following courses on Learning Lab:
42+
- [GitHub Actions: Hello World](https://lab.github.com/githubtraining/github-actions:-hello-world)
3543

36-
It is also worth noting that this course is one of many in a GitHub Actions Learning Path. It is recommended that you complete this learning path in order to get the most out of your Learning Lab experience.
44+
Since this is a course on [Docker](https://docs.docker.com/get-started/) based actions, having a basic understanding of Docker is recommended.
3745

3846
## Projects used
3947

40-
- [Docker](https://www.docker.com/), a container engine
4148
- [GitHub Actions Toolkit](https://github.com/actions/toolkit), a multipurpose JavaScript library for writing actions
49+
- [Docker](https://www.docker.com/), a container engine
4250
- [Python](https://www.python.org/doc/essays/blurb/), an interpreted, object-oriented, high-level programming language
4351
- [Go](https://golang.org/), Go is an open source programming language that makes it easy to build simple, reliable, and efficient software
4452
- [Requests](https://requests.readthedocs.io/en/master/), an elegant and simple HTTP library for Python
4553

4654
## Audience
4755

48-
This is a great course for intermediate developers who are looking to learn how to create custom actions to benefit their workflows. The focal point of the content isn't on which language to create your actions in, rather how to put the pieces of source code, metadata, `Dockerfile` and workflows together to accomplish your goals.
56+
Developers, DevOps Engineers, students, teams

responses/01_welcome-activity.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## Configuring a workflow
1+
## Setup a workflow file
22

3-
### :keyboard: Activity: Create a pull request to prepare the repository for actions
3+
### :keyboard: Activity: Create a pull request to add a workflow
44

55
1. Create a new workflow file titled `my-workflow.yml` by using the instructions below, or [this quicklink]({{quicklink}}).
66
- Go to the [Actions tab]({{ actionsUrl }}).
@@ -18,8 +18,6 @@ _It is important to place meaningful content into the body of the pull requests
1818

1919
</details>
2020

21-
I'll respond in the new pull request when I detect it has been created.
22-
2321
---
2422

25-
If at any point you're expecting a response and don't see one, refresh the page.
23+
I'll respond in the new pull request when I detect it has been created. If at any point you're expecting a response and don't see one, refresh the page.

responses/02_modify-workflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
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

5-
### :keyboard: Activity: Modify my-workflow.yml to remove boilerplate steps
5+
### :keyboard: Activity: Remove boilerplate steps from `my-workflow.yml`
66

77
1. [Edit]({{workflowFile}}) the `.github/workflows/my-workflow.yml` so that it has the contents below:
88

@@ -23,4 +23,4 @@ Currently `my-workflow.yml` is not set up correctly for our use-case. It worked
2323
2424
---
2525
26-
I'll respond in this pull request once you make these changes.
26+
I'll respond when you push changes to this pull request.

responses/03_reference-actions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ If you'd like to see more examples of workflows and actions then check out these
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+
## Add an action reference to the workflow
25+
26+
### :keyboard: Activity: Reference our custom action from `my-workflow.yml`
2527

2628
1. [Edit]({{workflowFile}}) the `my-workflow.yml` to have the following contents:
2729

@@ -45,4 +47,4 @@ If you'd like to see more examples of workflows and actions then check out these
4547
4648
---
4749
48-
I'll respond in this pull request once you make these changes.
50+
I'll respond when you push changes to this pull request.

responses/05_create-metadata.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
## Enough talk, lets do this!
1+
## Create the action metadata
22

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

5-
### :keyboard: Activity: Create the metadata file
5+
### :keyboard: Activity: Create an `action.yml` file and add necessary metadata
66

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

@@ -24,3 +24,7 @@ We will start with using the parameters that are **required** and later implemen
2424
1. Commit the changes to a new branch named `hello-world`
2525
1. Create a pull request titled **Add a Hello World action**.
2626
1. Supply the pull request body content and click `Create pull request`.
27+
28+
---
29+
30+
I'll respond when you create a new pull request.

0 commit comments

Comments
 (0)