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
Copy file name to clipboardExpand all lines: README.md
+10-33Lines changed: 10 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,47 +15,24 @@ _Write your own GitHub JavaScript Action and automate customized tasks unique to
15
15
</header>
16
16
17
17
<!--
18
-
<<< Author notes: Step 5 >>>
18
+
<<< Author notes: Step 6 >>>
19
19
Start this step by acknowledging the previous step.
20
20
Define terms and link to docs.github.com.
21
21
-->
22
22
23
-
## Step 5: Add your action to the workflow file
23
+
## Step 6: Trigger the joke action
24
24
25
-
_Great job! :tada:_
25
+
_Great job! :heart:_
26
26
27
-
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)
27
+
Everything is all set up and now we are ready to start laughing. You will find you have some joke related labels available to you in this repository. You don't have to use them, any label will trigger our workflow, but the easiest way to follow along would be to use suggested labels.
28
28
29
-
### :keyboard: Activity 1: Edit the custom action at the bottom of the workflow file.
29
+
### Trigger a joke
30
30
31
-
```yaml
32
-
- name: ha-ha
33
-
uses: ./.github/actions/joke-action
34
-
```
35
-
36
-
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.)
37
-
38
-
```yaml
39
-
name: JS Actions
40
-
41
-
on:
42
-
issues:
43
-
types: [labeled]
44
-
45
-
jobs:
46
-
action:
47
-
if: ${{ !github.event.repository.is_template }}
48
-
runs-on: ubuntu-latest
49
-
50
-
steps:
51
-
- uses: actions/checkout@v4
52
-
- name: ha-ha
53
-
uses: ./.github/actions/joke-action
54
-
```
55
-
56
-
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.
57
-
58
-
Wait about 20 seconds then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/en/actions) will automatically update to the next step.
31
+
1. Open issue #1 in the "Issues tab"
32
+
2. Apply the `first-joke` label to the issue
33
+
3. Wait a few seconds and then apply the `second-joke` label to the issue
34
+
4. Check the `JS Actions` workflow results on the "Actions tab"
35
+
5. Wait about 20 seconds then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/en/actions) will automatically update to the next step.
0 commit comments