Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev: github action for check GPG KEY #792

Open
datamweb opened this issue Aug 18, 2023 · 3 comments
Open

Dev: github action for check GPG KEY #792

datamweb opened this issue Aug 18, 2023 · 3 comments
Labels
dev github_actions Pull requests that update GitHub Actions code

Comments

@datamweb
Copy link
Collaborator

Shield does not accept commits that are not signed with GPG KEY, so there is an Github Action to automatically check the signature of commits and add a tag GPG-Signing needed and a comment to explain:

How to setup a GPG key
How to GPG-Signing Old Commits

@datamweb datamweb added help wanted Extra attention is needed github_actions Pull requests that update GitHub Actions code dev labels Aug 18, 2023
@kenjis
Copy link
Member

kenjis commented Aug 24, 2023

This is a shell script to check GPG signature by ChatGPT.

#!/bin/bash

commit_hash=$1

if [ -z "$commit_hash" ]; then
    echo "Usage: $0 <commit-hash>"
    exit 1
fi

signature=$(git show "$commit_hash" --show-signature 2>&1 | grep -o "gpg: Good signature")
if [ -z "$signature" ]; then
    echo "Error: Commit $commit_hash does not have a valid GPG signature."
    exit 1
fi

echo "Commit $commit_hash has a valid GPG signature."

@kenjis
Copy link
Member

kenjis commented Sep 21, 2023

See codeigniter4/CodeIgniter4#7938

@datamweb
Copy link
Collaborator Author

Smart Commenting are not working well at the moment.

@datamweb datamweb removed the help wanted Extra attention is needed label Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

No branches or pull requests

2 participants