For anyone looking to add commit signing (GPG) #334
ericsizemore
started this conversation in
Show and tell
Replies: 1 comment
-
Thanks for sharing @ericsizemore. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all.
Wasn't sure if this was the correct category; my apologies if not. I did perform a search but didn't come up with anything related to this, other than issue #132
I was using another action to add and commit until recently, when it started experiencing issues with my branch protection rules. I came across this action and decided to give it a try. I wanted to share a recent workflow update that, thus far, appears to be working for signing commits with a GPG key. I would imagine it could be tweaked, as I am not that well versed with GitHub actions as I would like. There are few things to note:
secrets.PAT
)https://github.com/yourusername/yourrepo/settings/secrets/actions/new
:secrets.GPG_PRIVATE_KEY
,secrets.GPG_PASSPHRASE
)Allow force-pushes
under my branch protection rules. I also enabledSpecify who can force push
with myself listed.steps.import-gpg.outputs.name
andsteps.import-gpg.outputs.email
will use the information tied to the GPG key. Of course, the key you use should match the name and email address on your GitHub account.You can see the workflow run for this here. You can see the resulting commit here which shows me as the author and that it is
Verified
.Lastly, it is currently 8am and I'm running on little sleep :D If you notice any issues, or have suggestions, please let me know! I hope this helps someone that was struggling much like I was.
Regards,
Eric
Beta Was this translation helpful? Give feedback.
All reactions