Skip to content

Commit 488a653

Browse files
committed
add reusable actions
1 parent e489158 commit 488a653

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Traditional CI GitHub Actions
2+
3+
## Introduction
4+
5+
The following example shows you how GitHub Actions jobs help you setup a CI workflow
6+
7+
## Creating your first CI workflow
8+
9+
1. Fork this repo from [here](https://github.com/wizelineacademy/github-actions-tutorial) or create a new repo from [here](https://github.com/new)
10+
11+
1. Start the web editor by pressing "." in your repo `https://github.com/<yourusername>/github-actions-tutorial`
12+
13+
1. Create a new branch
14+
15+
1. Create a `.github/workflows` directory in your repository in GitHub if this directory does not already exist.
16+
17+
1. In the `.github/workflows` directory, create a file named gh-ci-reuse.yml
18+
19+
1. Copy the following YAML contents into the `gh-ci-reuse.yml` file:
20+
21+
```yaml{:copy}
22+
name: GitHub Actions Reusable actions
23+
on:
24+
pull_request:
25+
branches: [main]
26+
jobs:
27+
reuse-ci:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout main
31+
uses: actions/checkout@v2
32+
- name: reviewdog-markdownlint
33+
uses: reviewdog/[email protected]
34+
with:
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
reporter: github-pr-review
37+
filter_mode: nofilter # file to only check new or mod files
38+
```
39+
40+
1. Create a PR with new branch and use main as base branch
41+
42+
1. Review Action Tab
43+
44+
1. Review our current Open PR for failed CI
45+
46+
1. Lets fix our fix `static_hugo_site/content/post/sample-post/index.md` line 21 and break it in 2
47+
48+
```md
49+
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows
50+
whether basic HTML elements are decorated with CSS in a Hugo theme.
51+
```
52+
53+
1. Commit file
54+
55+
1. Review our current Open PR for Pass CI

0 commit comments

Comments
 (0)