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
{{ message }}
This repository was archived by the owner on Sep 1, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: responses/11_edit-workflow.md
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,21 @@
2
2
3
3
At this point we can't expect much from our workflow, if you remember all of its contents are commented out. Let's go ahead and fix that now so that we can see our Action fetch us a joke.
4
4
5
+
We are going to add a new trigger to our workflow to make it easier for us to trigger it without the need to push changes to the repository. Remember that every time our workflow runs this Action we should see a new joke which means we need a good way to make it run a few times. If you recall there are many [events](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#webhook-events) that trigger a workflow run.
6
+
7
+
We will use the `issues` event and specify the activity type to be when an issue get's `labeled`. This will allow us to trigger our workflow by simply placing a label on this pull request.
8
+
5
9
### :keyboard: Activity: Restore the workflow file
6
10
7
-
The great news is that we only need to add a call to our new Action. Follow these steps to do so:
11
+
Let's change the tigger and add the joke Action
8
12
9
13
1.[Edit]({{workflowFile}}) your current workflow file
10
14
2. Uncomment the contents of the file
11
-
3.Add a new `step:`that has a `name:` of **ha-ha** and`uses:`your new `joke-action`
12
-
4.Commit the changes to the `action-two` branch
13
-
5.Check the workflow results on the [Actions tab]({{actionsUrl}})
15
+
3.Change the `on:`property to reflect the `issues labeled`[event](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#webhook-events)
16
+
4.Add a new `step:` that has a `name:` of **ha-ha** and`uses:` your new `joke-action`
17
+
5.Commit the changes to the `action-two` branch
14
18
15
-
I'll respond once I notice your workflow has completed
19
+
I'll respond once you commit your changes
16
20
17
21
---
18
22
@@ -21,7 +25,9 @@ I'll respond once I notice your workflow has completed
0 commit comments