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
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.
37
49
- For owner, choose your personal account or an organization to host the repository.
38
-
- We recommend creating a public repository—private repositories will [use Actions minutes](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions).
39
-

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.
40
52
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.
41
53
42
54
</details>
@@ -84,7 +96,7 @@ Most of your work going forward will take place away from your Skills repository
84
96
1.[ ][Node.js](https://nodejs.org)
85
97
2.[ ][Visual Studio Code](https://code.visualstudio.com/) or your editor of choice
86
98
3.[ ][Git](https://git-scm.com/)
87
-
99
+
88
100
### :keyboard: Activity 1: Initialize a new JavaScript project
89
101
90
102
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
98
110
```shell
99
111
cd<local folder with cloned repo>
100
112
```
101
-
4. We are using branch called `main`.
113
+
4. We are using branch called `main`.
102
114
```shell
103
115
git switch main
104
116
```
@@ -130,14 +142,14 @@ Once you have the necessary tools installed locally, follow these steps to begin
130
142
11. Wait about 20 seconds then refresh this page for the next step.
131
143
132
144
</details>
133
-
145
+
134
146
<details id=2>
135
147
<summary><h2> Step 2: Configure Your Action</h2></summary>
136
148
137
149
_Let's keep going! :bike:_
138
150
139
151
### Excellent!
140
-
152
+
141
153
Now that we have the custom action pre-requisites, let us create **joke-action** action.
142
154
143
155
### :keyboard: Activity 1: Configure Your Action
@@ -168,7 +180,7 @@ We will start with using the parameters that are **required** and later implemen
168
180
5. Wait about 20 seconds then refresh this page for the next step.
169
181
170
182
</details>
171
-
183
+
172
184
<details id=3>
173
185
<summary><h2> Step 3: Create the metadata file</h2></summary>
174
186
@@ -198,7 +210,7 @@ This file defines the following information about your action:
198
210
Read more about [Action metadata](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions)
199
211
200
212
### :keyboard: Activity 1: Create the metadata file
201
-
213
+
202
214
All of the following steps take place inside of the `.github/actions/joke-action` directory.
203
215
204
216
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
228
240
4. Wait about 20 seconds then refresh this page for the next step.
229
241
230
242
</details>
231
-
243
+
232
244
<details id=4>
233
245
<summary><h2> Step 4: Create the JavaScript files for your action</h2></summary>
234
246
@@ -303,7 +315,7 @@ Next we define an **asynchronous JavaScript function** to make the request for u
303
315
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.
304
316
305
317
This file finishes up by exporting the newly created function so that we can use it in our `main.js` file.
306
-
318
+
307
319
</details>
308
320
309
321
### 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
340
352
_Don't forget to call the `run()` function._
341
353
342
354
</details>
343
-
355
+
344
356
### :keyboard: Activity 1: Creating the JavaScript files for your new action.
345
357
346
358
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._
393
405
```
394
406
395
407
</details>
396
-
408
+
397
409
<details id=5>
398
410
<summary><h2> Step 5: Add your action to the workflow file</h2></summary>
399
411
400
412
_Great job! :tada:_
401
-
413
+
402
414
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
+
404
416
### :keyboard: Activity 1: Edit the custom action at the bottom of the workflow file.
405
417
406
418
```yaml
407
419
- name: ha-ha
408
420
uses: ./.github/actions/joke-action
409
421
```
410
422
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.)
412
424
413
425
```yaml
414
426
name: JS Actions
@@ -432,7 +444,7 @@ jobs:
432
444
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 selectthe`Commit directly to the main branch` option.
433
445
434
446
</details>
435
-
447
+
436
448
<details id=6>
437
449
438
450
<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
447
459
2. Apply the `first-joke` label to the issue
448
460
3. Wait a few seconds and then apply the `second-joke` label to the issue
449
461
4. Check the `JS Actions` workflow results on the "Actions tab"
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
474
486
475
487
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
+
477
489
### What's next?
478
490
479
491
- [Take another GitHub Skills course](https://github.com/githubskills).
Get help: [Post in our discussion board](https://github.com/skills/.github/discussions) • [Review the GitHub status page](https://www.githubstatus.com/)
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.
0 commit comments