mirror of
https://github.com/atmoz/sftp.git
synced 2024-11-17 12:51:33 -05:00
Verify either commit or tag
This commit is contained in:
parent
3bc191cc6c
commit
fcf9c8f1ac
1 changed files with 6 additions and 1 deletions
7
.github/workflows/docker-image.yml
vendored
7
.github/workflows/docker-image.yml
vendored
|
@ -21,7 +21,12 @@ jobs:
|
||||||
# Only allow commits signed by owner
|
# Only allow commits signed by owner
|
||||||
- name: Verify commit signature
|
- name: Verify commit signature
|
||||||
run: |
|
run: |
|
||||||
if git verify-commit --raw HEAD 2>&1 | grep -e VALIDSIG | grep -q "$GPG_KEY_FINGERPRINT"; then
|
verify_head() {
|
||||||
|
( git verify-commit --raw HEAD || git verify-tag --raw $(git tag --points-at HEAD) ) 2>&1 \
|
||||||
|
| grep -e VALIDSIG | grep -q "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
if verify_head "$GPG_KEY_FINGERPRINT"; then
|
||||||
echo "Verified signature from $GPG_KEY_FINGERPRINT"
|
echo "Verified signature from $GPG_KEY_FINGERPRINT"
|
||||||
else
|
else
|
||||||
echo "Missing signature by $GPG_KEY_FINGERPRINT"
|
echo "Missing signature by $GPG_KEY_FINGERPRINT"
|
||||||
|
|
Loading…
Reference in a new issue