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

Commit ccbadbb

Browse files
committed
change flow in 11_edit-workflow
1 parent 4b41775 commit ccbadbb

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

responses/11_edit-workflow.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22

33
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.
44

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+
59
### :keyboard: Activity: Restore the workflow file
610

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
812

913
1. [Edit]({{workflowFile}}) your current workflow file
1014
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
1418

15-
I'll respond once I notice your workflow has completed
19+
I'll respond once you commit your changes
1620

1721
---
1822

@@ -21,7 +25,9 @@ I'll respond once I notice your workflow has completed
2125
```yaml
2226
name: JS Actions
2327

24-
on: [push]
28+
on:
29+
issues:
30+
types: [labeled]
2531

2632
jobs:
2733
action:

responses/12_trigger-workflow.md

Whitespace-only changes.

0 commit comments

Comments
 (0)