1 |
commit: e05b016aee4e73f27e35fbe27e6b750618d57562 |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 29 16:53:35 2021 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 29 18:26:01 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/cargo-ebuild.git/commit/?id=e05b016a |
7 |
|
8 |
.github: add dco check |
9 |
|
10 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
11 |
|
12 |
.github/workflows/dco.yml | 31 +++++++++++++++++++++++++++++++ |
13 |
1 file changed, 31 insertions(+) |
14 |
|
15 |
diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml |
16 |
new file mode 100644 |
17 |
index 0000000..8e62a3b |
18 |
--- /dev/null |
19 |
+++ b/.github/workflows/dco.yml |
20 |
@@ -0,0 +1,31 @@ |
21 |
+name: DCO check |
22 |
+ |
23 |
+on: |
24 |
+ push: |
25 |
+ branches: [ master ] |
26 |
+ pull_request: |
27 |
+ branches: [ master ] |
28 |
+ |
29 |
+jobs: |
30 |
+ dco: |
31 |
+ runs-on: ubuntu-latest |
32 |
+ steps: |
33 |
+ - uses: actions/checkout@v2 |
34 |
+ with: |
35 |
+ ref: ${{ github.event.after }} |
36 |
+ - name: check Signed-off-by |
37 |
+ run: | |
38 |
+ __COMMIT_MSG="$(git log --format=%B -n 1 ${{ github.event.after }})" |
39 |
+ if [[ ! ${__COMMIT_MSG} =~ "Signed-off-by:" ]]; then |
40 |
+ __errmsg="::error ::Missing GCO sign-off |
41 |
+ Please read the terms of Gentoo Certificate of Origin[1] and acknowledge them by adding a sign-off to all your commits. |
42 |
+ [1] https://www.gentoo.org/glep/glep-0076.html#certificate-of-origin" |
43 |
+ __errmsg="${__errmsg//'%'/'%25'}" |
44 |
+ __errmsg="${__errmsg//$'\n'/'%0A'}" |
45 |
+ __errmsg="${__errmsg//$'\r'/'%0D'}" |
46 |
+ |
47 |
+ echo "${__errmsg}" |
48 |
+ exit 1 |
49 |
+ else |
50 |
+ echo "::set-output name=dco::ok" |
51 |
+ fi |