Skip to content

Commit dbffc5e

Browse files
committed
update actions/checkout version
actions/checkout@v3 is recommended to support Node.js v16 (Node.js v12 is deprecated in Github action) Signed-off-by: Inho Oh <webispy@gmail.com>
1 parent e605aac commit dbffc5e

File tree

5 files changed

+35
-15
lines changed

5 files changed

+35
-15
lines changed

.checkpatch.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
--no-tree
2+
--ignore FILE_PATH_CHANGES
3+
--ignore GERRIT_CHANGE_ID
4+
--ignore GIT_COMMIT_ID
5+
--ignore SPDX_LICENSE_TAG

.github/workflows/main.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ jobs:
55
name: checkpatch review
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v1
8+
- uses: actions/checkout@v3
9+
with:
10+
ref: ${{ github.event.pull_request.head.sha }}
11+
- name: Info
12+
run: |
13+
echo "Repository: $GITHUB_REPOSITORY"
14+
echo "Workspace: $GITHUB_WORKSPACE"
15+
pwd
16+
ls -la `pwd`
917
- name: Run checkpatch review
1018
uses: webispy/checkpatch-action@master
1119
env:

README.md

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ jobs:
3030
name: checkpatch review
3131
runs-on: ubuntu-latest
3232
steps:
33-
- uses: actions/checkout@v1
33+
- uses: actions/checkout@v3
34+
with:
35+
ref: ${{ github.event.pull_request.head.sha }}
3436
- name: Run checkpatch review
35-
uses: webispy/checkpatch-action@master
37+
uses: webispy/checkpatch-action@v9
3638
```
3739
3840
For using a custom checkpatch script, pass the `CHECKPATCH_COMMAND` environment
@@ -46,15 +48,18 @@ jobs:
4648
name: checkpatch review
4749
runs-on: ubuntu-latest
4850
steps:
49-
- uses: actions/checkout@v1
51+
- uses: actions/checkout@v3
52+
with:
53+
ref: ${{ github.event.pull_request.head.sha }}
5054
- name: Run DPDK checkpatches.sh review
51-
uses: webispy/checkpatch-action@master
55+
uses: webispy/checkpatch-action@v9
5256
env:
5357
DPDK_CHECKPATCH_PATH: /usr/bin/checkpatch.pl
5458
CHECKPATCH_COMMAND: ./devtools/checkpatches.sh
5559
```
5660

5761
**Note:** For **private repositories** this action needs access to the `GITHUB_TOKEN`. It needs read access to `contents` and `pull-requests` as minimum permissions. For example:
62+
5863
```yml
5964
name: checkpatch review
6065
on: [pull_request]
@@ -66,9 +71,11 @@ jobs:
6671
contents: read
6772
pull-requests: read
6873
steps:
69-
- uses: actions/checkout@v1
74+
- uses: actions/checkout@v3
75+
with:
76+
ref: ${{ github.event.pull_request.head.sha }}
7077
- name: Run checkpatch review
71-
uses: webispy/checkpatch-action@master
78+
uses: webispy/checkpatch-action@v9
7279
env:
7380
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
7481
```
@@ -77,11 +84,11 @@ jobs:
7784

7885
The `checkpatch.pl` tool supports a configuration file for setting options. Just create a `.checkpatch.conf` file in the top-level directory of your project and specify options in it.
7986

80-
https://docs.kernel.org/dev-tools/checkpatch.html#type-descriptions
87+
<https://docs.kernel.org/dev-tools/checkpatch.html#type-descriptions>
8188

8289
#### Example for `.checkpatch.conf` file
8390

84-
```
91+
```text
8592
# This isn't actually a Linux kernel tree
8693
--no-tree
8794
@@ -104,20 +111,20 @@ https://docs.kernel.org/dev-tools/checkpatch.html#type-descriptions
104111

105112
Following files are used to this project.
106113

107-
- https://raw.githubusercontent.com/torvalds/linux/master/scripts/checkpatch.pl
108-
- https://raw.githubusercontent.com/torvalds/linux/master/scripts/spelling.txt
114+
- <https://raw.githubusercontent.com/torvalds/linux/master/scripts/checkpatch.pl>
115+
- <https://raw.githubusercontent.com/torvalds/linux/master/scripts/spelling.txt>
109116

110117
### Patch
111118

112119
#### Add option for excluding directories
113120

114121
From [zephyr](https://github.com/zephyrproject-rtos/zephyr) project:
115122

116-
- https://github.com/zephyrproject-rtos/zephyr/commit/92a12a19ae5ac5fdf441c690c48eed0052df326d
123+
- <https://github.com/zephyrproject-rtos/zephyr/commit/92a12a19ae5ac5fdf441c690c48eed0052df326d>
117124

118125
#### Disable warning for "No structs that should be const ..."
119126

120-
- https://github.com/nugulinux/docker-devenv/blob/bionic/patches/0002-ignore_const_struct_warning.patch
127+
- <https://github.com/nugulinux/docker-devenv/blob/bionic/patches/0002-ignore_const_struct_warning.patch>
121128

122129
### Docker image
123130

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ echo "REF: $GITHUB_REF"
1313
echo "HEAD-REF: $GITHUB_HEAD_REF"
1414
echo "BASE-REF: $GITHUB_BASE_REF"
1515
pwd
16-
ls -l `pwd`
16+
ls -la `pwd`
1717
id
1818

1919
# Add safe directory option for github workspace to disable fatal error

review.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ do
5757

5858
# The row is started with "#"
5959
if [[ "$row" =~ ^\# ]]; then
60-
# Split the string using ':' seperator
60+
# Split the string using ':' separator
6161
IFS=':' read -r -a list <<< "$row"
6262

6363
# Get file-name after removing spaces.

0 commit comments

Comments
 (0)