diff options
author | 2021-07-29 09:53:35 -0700 | |
---|---|---|
committer | 2021-07-29 11:26:01 -0700 | |
commit | e05b016aee4e73f27e35fbe27e6b750618d57562 (patch) | |
tree | ece7261c6a4617881ccc8009e53d4a331fcc208c | |
parent | .github: add basic cargo checks (diff) | |
download | cargo-ebuild-e05b016aee4e73f27e35fbe27e6b750618d57562.tar.gz cargo-ebuild-e05b016aee4e73f27e35fbe27e6b750618d57562.tar.bz2 cargo-ebuild-e05b016aee4e73f27e35fbe27e6b750618d57562.zip |
.github: add dco check
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
-rw-r--r-- | .github/workflows/dco.yml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml new file mode 100644 index 0000000..8e62a3b --- /dev/null +++ b/.github/workflows/dco.yml @@ -0,0 +1,31 @@ +name: DCO check + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + dco: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.after }} + - name: check Signed-off-by + run: | + __COMMIT_MSG="$(git log --format=%B -n 1 ${{ github.event.after }})" + if [[ ! ${__COMMIT_MSG} =~ "Signed-off-by:" ]]; then + __errmsg="::error ::Missing GCO sign-off + Please read the terms of Gentoo Certificate of Origin[1] and acknowledge them by adding a sign-off to all your commits. + [1] https://www.gentoo.org/glep/glep-0076.html#certificate-of-origin" + __errmsg="${__errmsg//'%'/'%25'}" + __errmsg="${__errmsg//$'\n'/'%0A'}" + __errmsg="${__errmsg//$'\r'/'%0D'}" + + echo "${__errmsg}" + exit 1 + else + echo "::set-output name=dco::ok" + fi |