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.
@{{user.login}} it looks like you workflow has completed! Let's take a look at the results!
4
+
5
+
We should be pretty familiar with the first portion of the workflow, it's the same as the first time it ran, and it just creates a comment whenever a new issue has been created.
6
+
7
+
The second portion may exactly be clear to you, but this issue was added to a project board that is present in this repository. Checkout the [projects tab]({{projectTab}}) if you want to see that this issue has been added!
8
+
9
+
#### Multiple steps
10
+
11
+
One benefit of using actions is the ability to separate `jobs` into smaller units of work called `steps`. If we think about what our workflow is doing we can see that it makes more sense to have these two tasks take place across two steps.
12
+
13
+
As an added advantage, once we break the current workflow into multiple steps we can apply logic through expressions to them. This will let us create rules around when steps are allowed to run. Ultimately this allows us to optimize our workflow run!
14
+
15
+
Since GitHub Script is simply an action, breaking each unique task into a new step works just fine! We will do this in our next activity!
💡Did you know that GitHub Script also grants you access to a full Node.js environment?
4
+
5
+
Although we wouldn't recommend using GitHub Script to write the logic for complex actions, there are use cases where you may want to leverage using a little more than just the octokit/rest.js API.
6
+
7
+
One such use case is our issue comment. Right now it is pretty hard coded the way it is making it less than ideal. What if we wanted to display our contribution guide every time an issue was opened?
8
+
9
+
Instead of writing the guide directly into our workflow, we can use the Node.js File System module to read a file and use it as the body of our issue comment.
10
+
11
+
If we want access to the files within our repository, we need to make sure we include the `actions/checkout` action in our workflow as the first step.
0 commit comments