Update start course button (#28) · skills/write-javascript-actions@54ecf1a · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Commit 54ecf1a

Browse files
authored
Update start course button (#28)
* Update start course button * Update README.md
1 parent 06afef9 commit 54ecf1a

File tree

1 file changed

+34
-23
lines changed

1 file changed

+34
-23
lines changed

README.md

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,24 @@ Write your own GitHub JavaScript Action and automate customized tasks unique to
3131

3232
## How to start this course
3333

34+
<!-- For start course, run in JavaScript:
35+
'https://github.com/new?' + new URLSearchParams({
36+
template_owner: 'skills',
37+
template_name: 'write-javascript-actions',
38+
owner: '@me',
39+
name: 'skills-write-javascript-actions',
40+
description: 'My clone repository',
41+
visibility: 'public',
42+
}).toString()
43+
-->
44+
45+
[![start-course](https://user-images.githubusercontent.com/1221423/235727646-4a590299-ffe5-480d-8cd5-8194ea184546.svg)](https://github.com/new?template_owner=skills&template_name=write-javascript-actions&owner=%40me&name=skills-write-javascript-actions&description=My+clone+repository&visibility=public)
46+
3447
1. Right-click **Start course** and open the link in a new tab.
35-
<br />[![start-course](https://user-images.githubusercontent.com/1221423/218596841-0645fe1a-4aaf-4f51-9ab3-8aa2d3fdd487.svg)](https://github.com/skills/writing-javascript-actions/generate)
36-
2. In the new tab, follow the prompts to create a new repository.
48+
2. In the new tab, most of the prompts will automatically fill in for you.
3749
- For owner, choose your personal account or an organization to host the repository.
38-
- We recommend creating a public repositoryprivate repositories will [use Actions minutes](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions).
39-
![Create a new repository](https://user-images.githubusercontent.com/1221423/218594143-e60462b6-9f2a-4fa3-80de-063ac5429aab.png)
50+
- We recommend creating a public repository, as private repositories will [use Actions minutes](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions).
51+
- Scroll down and click the **Create repository** button at the bottom of the form.
4052
3. After your new repository is created, wait about 20 seconds, then refresh the page. Follow the step-by-step instructions in the new repository's README.
4153

4254
</details>
@@ -84,7 +96,7 @@ Most of your work going forward will take place away from your Skills repository
8496
1. [ ] [Node.js](https://nodejs.org)
8597
2. [ ] [Visual Studio Code](https://code.visualstudio.com/) or your editor of choice
8698
3. [ ] [Git](https://git-scm.com/)
87-
99+
88100
### :keyboard: Activity 1: Initialize a new JavaScript project
89101

90102
Once you have the necessary tools installed locally, follow these steps to begin creating your first action.
@@ -98,7 +110,7 @@ Once you have the necessary tools installed locally, follow these steps to begin
98110
```shell
99111
cd <local folder with cloned repo>
100112
```
101-
4. We are using branch called `main`.
113+
4. We are using branch called `main`.
102114
```shell
103115
git switch main
104116
```
@@ -130,14 +142,14 @@ Once you have the necessary tools installed locally, follow these steps to begin
130142
11. Wait about 20 seconds then refresh this page for the next step.
131143

132144
</details>
133-
145+
134146
<details id=2>
135147
<summary><h2> Step 2: Configure Your Action</h2></summary>
136148

137149
_Let's keep going! :bike:_
138150
139151
### Excellent!
140-
152+
141153
Now that we have the custom action pre-requisites, let us create **joke-action** action.
142154
143155
### :keyboard: Activity 1: Configure Your Action
@@ -168,7 +180,7 @@ We will start with using the parameters that are **required** and later implemen
168180
5. Wait about 20 seconds then refresh this page for the next step.
169181
170182
</details>
171-
183+
172184
<details id=3>
173185
<summary><h2> Step 3: Create the metadata file</h2></summary>
174186
@@ -198,7 +210,7 @@ This file defines the following information about your action:
198210
Read more about [Action metadata](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions)
199211
200212
### :keyboard: Activity 1: Create the metadata file
201-
213+
202214
All of the following steps take place inside of the `.github/actions/joke-action` directory.
203215
204216
Our action does not require much metadata for it to run correctly. We will not be accepting any inputs, we will however be setting a single output this time.
@@ -228,7 +240,7 @@ Our action does not require much metadata for it to run correctly. We will not b
228240
4. Wait about 20 seconds then refresh this page for the next step.
229241
230242
</details>
231-
243+
232244
<details id=4>
233245
<summary><h2> Step 4: Create the JavaScript files for your action</h2></summary>
234246
@@ -303,7 +315,7 @@ Next we define an **asynchronous JavaScript function** to make the request for u
303315
Lastly, we `return` the `res.joke` which is only the value associated with the `joke` key of the JSON Object. This value will be random every time our action runs because of how we are interacting with the **icanhazdadjoke** API.
304316
305317
This file finishes up by exporting the newly created function so that we can use it in our `main.js` file.
306-
318+
307319
</details>
308320
309321
### Creating the main entry point for your action
@@ -340,7 +352,7 @@ Finally we finish the function with by setting the contents of the joke as the v
340352
_Don't forget to call the `run()` function._
341353
342354
</details>
343-
355+
344356
### :keyboard: Activity 1: Creating the JavaScript files for your new action.
345357
346358
1. Create and add the following contents to the `.github/actions/joke-action/joke.js` file:
@@ -393,22 +405,22 @@ _Don't forget to call the `run()` function._
393405
```
394406
395407
</details>
396-
408+
397409
<details id=5>
398410
<summary><h2> Step 5: Add your action to the workflow file</h2></summary>
399411
400412
_Great job! :tada:_
401-
413+
402414
All of the following steps will add the action to the workflow file that’s already in the repo [`my-workflow.yml` file](/.github/workflows/my-workflow.yml)
403-
415+
404416
### :keyboard: Activity 1: Edit the custom action at the bottom of the workflow file.
405417
406418
```yaml
407419
- name: ha-ha
408420
uses: ./.github/actions/joke-action
409421
```
410422
411-
Here is what the full file should look like (we’re using issues instead of the pull request event and removing the reference to the hello world action.)
423+
Here is what the full file should look like (we’re using issues instead of the pull request event and removing the reference to the hello world action.)
412424
413425
```yaml
414426
name: JS Actions
@@ -432,7 +444,7 @@ jobs:
432444
You can make these changes in your repository by opening [`my-workflow.yml`](/.github/workflows/my-workflow.yml) in another browser tab and [editing the file directly](https://docs.github.com/en/repositories/working-with-files/managing-files/editing-files). Make sure to select the `Commit directly to the main branch` option.
433445
434446
</details>
435-
447+
436448
<details id=6>
437449
438450
<summary><h2> Step 6: Trigger the joke action</h2></summary>
@@ -447,15 +459,15 @@ Everything is all set up and now we are ready to start laughing. You will find y
447459
2. Apply the `first-joke` label to the issue
448460
3. Wait a few seconds and then apply the `second-joke` label to the issue
449461
4. Check the `JS Actions` workflow results on the "Actions tab"
450-
462+
451463
</details>
452464
453465
<details id=X>
454466
<summary><h2>Finish</h2></summary>
455467
456468
<img src=https://octodex.github.com/images/poptocat_v2.png alt=celebrate width=300 align=right>
457469
458-
### Congratulations, you've completed this course!
470+
### Congratulations, you've completed this course!
459471
460472
In this course, you've learned a lot about developing custom actions using JavaScript and Actions Toolkit.
461473
@@ -470,10 +482,10 @@ Some notable actions you will find on the marketplace are:
470482
- [Jekyll action](https://github.com/marketplace/actions/jekyll-action)
471483
- [Run Jest](https://github.com/marketplace/actions/run-jest)
472484
473-
And that just scratches the surface of the 1600+ and counting actions you will find on the marketplace
485+
And that just scratches the surface of the 1600+ and counting actions you will find on the marketplace
474486
475487
Follow [this guide](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/publishing-actions-in-github-marketplace#publishing-an-action) to learn how to publish your actions to the GitHub Marketplace
476-
488+
477489
### What's next?
478490
479491
- [Take another GitHub Skills course](https://github.com/githubskills).
@@ -487,4 +499,3 @@ Follow [this guide](https://help.github.com/en/actions/automating-your-workflow-
487499
Get help: [Post in our discussion board](https://github.com/skills/.github/discussions) &bull; [Review the GitHub status page](https://www.githubstatus.com/)
488500
489501
&copy; 2022 GitHub &bull; [Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/code_of_conduct.md) &bull; [MIT License](https://gh.io/mit)
490-

0 commit comments

Comments
 (0)

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.