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
+34-21
Original file line number
Diff line number
Diff line change
@@ -6,34 +6,47 @@ _Create and run a GitHub Actions workflow._
6
6
7
7
</header>
8
8
9
-
## Welcome
9
+
## Step 1: Create a workflow file
10
10
11
-
Automation is key for streamlining your work processes, and [GitHub Actions](https://docs.github.com/actions) is the best way to supercharge your workflow.
11
+
_Welcome to "Hello GitHub Actions"! :wave:_
12
12
13
-
-**Who is this for**: Developers, DevOps engineers, students, managers, teams, GitHub users.
14
-
-**What you'll learn**: How to create workflow files, trigger workflows, and find workflow logs.
15
-
-**What you'll build**: An Actions workflow that will check emoji shortcode references in Markdown files.
16
-
-**Prerequisites**: In this course you will work with issues and pull requests, as well as edit files. We recommend you take the [Introduction to GitHub](https://github.com/skills/introduction-to-github) course first.
17
-
-**How long**: This course can be finished in less than two hours.
13
+
**What is _GitHub Actions_?**: GitHub Actions is a flexible way to automate nearly every aspect of your team's software workflow. You can automate testing, continuously deploy, review code, manage issues and pull requests, and much more. The best part, these workflows are stored as code in your repository and easily shared and reused across teams. To learn more, check out these resources:
18
14
19
-
In this course, you will:
15
+
- The GitHub Actions feature page, see [GitHub Actions](https://github.com/features/actions).
16
+
- The "GitHub Actions" user documentation, see [GitHub Actions](https://docs.github.com/actions).
20
17
21
-
1. Create a workflow
22
-
2. Add a job
23
-
3. Add a run step
24
-
4. Merge your pull request
25
-
5. See effect of the workflow
18
+
**What is a _workflow_?**: A workflow is a configurable automated process that will run one or more jobs. Workflows are defined in special files in the `.github/workflows` directory and they execute based on your chosen event. For this exercise, we'll use a `pull_request` event.
26
19
27
-
### How to start this course
20
+
- To read more about workflows, jobs, and events, see "[Understanding GitHub Actions](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions)".
21
+
- If you want to learn more about the `pull_request` event before using it, see "[pull_request](https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request)".
To get you started, we ran an Actions workflow in your newrepository that, among other things, created a branch for you to work in, called `welcome-workflow`.
30
24
31
-
1. Right-click **Start course** and open the link in a new tab.
32
-
2. In the new tab, most of the prompts will automatically fill in for you.
33
-
- For owner, choose your personal account or an organization to host the repository.
34
-
- 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).
35
-
- Scroll down and click the **Create repository** button at the bottom of the form.
36
-
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.
25
+
### :keyboard: Activity: Create a workflow file
26
+
27
+
1. Open a new browser tab, and navigate to this same repository. Then, work on the steps in your second tab while you read the instructions in this tab.
28
+
1. Create a pull request. This will contain all of the changes you'll make throughout this part of the course.
29
+
30
+
Click the **Pull Requests** tab, click **New pull request**, set `base: main` and `compare:welcome-workflow`, click **Create pull request**, then click **Create pull request** again.
31
+
32
+
1. Navigate to the **Code** tab.
33
+
1. From the **main** branch dropdown, click on the **welcome-workflow** branch.
34
+
1. Navigate to the `.github/workflows/` folder, then select **Add file** and click on **Create new file**.
35
+
1. In the **Name your file** field, enter `welcome.yml`.
36
+
1. Add the following content to the `welcome.yml` file:
37
+
38
+
```yaml copy
39
+
name: Post welcome comment
40
+
on:
41
+
pull_request:
42
+
types: [opened]
43
+
permissions:
44
+
pull-requests: write
45
+
```
46
+
47
+
1. To commit your changes, click **Commit changes**.
48
+
1. Type a commit message, select **Commit directly to the welcome-workflow branch** and click **Commit changes**.
49
+
1. Wait about 20 seconds, then refresh this page (the one you're following instructions from). A separate Actions workflow in the repository (not the workflow you created) will run and will automatically replace the contents of this README file with instructions for the next step.
0 commit comments