Skip to content

Add GPG Signing Support #51

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

Merged
merged 30 commits into from
Jan 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
358b71a
feat(action.yml): add `gpg` inputs
Oct 24, 2022
8d41906
feat(entrypoing.sh): add `gpg` sign
Oct 24, 2022
0735f8b
fix(entrypoint.sh): set git config
Oct 24, 2022
fa64f0e
fix(gpg): add `signingkey`
Oct 24, 2022
2bae08e
feat(debug): add option for debug output
Oct 24, 2022
d4f4171
fix(signingkey): specify UID
Oct 24, 2022
94d316f
fix(entrypoint.sh): add `gpg.program`
Oct 24, 2022
a1c8571
feat(entrypoint.sh): write `gpg` script
Oct 24, 2022
2cf68aa
fix(entrypoint.sh): replace `systemctl`
Oct 24, 2022
6aa4862
fix(entrypoint.sh): remove `sudo`
Oct 24, 2022
c4d392c
Revert "fix(entrypoint.sh): replace `systemctl`"
Oct 24, 2022
5f51069
Revert "feat(entrypoint.sh): write `gpg` script"
Oct 24, 2022
0d6bd3f
Revert "fix(entrypoint.sh): add `gpg.program`"
Oct 24, 2022
a877e09
fix(entrypoint.sh): remove signing commits
Oct 24, 2022
42dd53b
fix(entrypoint.sh): remove signing configs
Oct 24, 2022
643bfdc
fix(entrypoint.sh): remove `--gpg-sign`
Oct 24, 2022
de4b095
fix(entrypoint.sh): add `commit.gpgsign`
Oct 24, 2022
e9c803c
fix(entrypoint.sh): add `gpg-sign` back
Oct 24, 2022
dee95ea
fix(entrypoint.sh): move `--gpg-sign` after bump
Oct 24, 2022
e543aff
fix(entrypoint.sh): move `--debug`
Oct 24, 2022
6215295
Revert "fix(entrypoint.sh): move `--debug`"
Oct 24, 2022
467d6ca
fix(entrypoint.sh): add `commit.gpgsign`
Oct 24, 2022
4a8d87f
ci(test): add `gpg -K` to stdout
Oct 24, 2022
4baddf4
ci(test): more printouts
Oct 24, 2022
c50654a
ci(test): even more printouts
Oct 24, 2022
9c830e5
ci(test): print which `gpg` is running
Oct 24, 2022
b024f58
ci(test): let `import-gpg` setup `gpg`
Oct 25, 2022
b67ce16
ci(test): print `gpg --version`
Oct 25, 2022
3b2cae5
feat(ci): run in docker container
Oct 25, 2022
aaea398
Revert "feat(ci): run in docker container"
Oct 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,17 @@ inputs:
description: "Manually specify the desired increment"
required: false
check_consistency:
default: false
default: 'false'
description: "check consistency among versions defined in commitizen configuration and version_files"
required: false
gpg_sign:
description: >
If true, use GPG to sign commits and tags (for git operations). Requires separate
setup of GPG key and passphrase in GitHub Actions (e.g. with the action
crazy-max/ghaction-import-gpg)
required: false
default: "false"
debug:
description: "If true, prints debug output to GitHub Actions stdout."
required: false
default: "false"
10 changes: 9 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

gpg --version

if [[ -z $INPUT_GITHUB_TOKEN ]]; then
echo 'Missing input "github_token: ${{ secrets.GITHUB_TOKEN }}".' >&2
exit 1
Expand Down Expand Up @@ -29,10 +31,16 @@ echo "Commitizen version: $(cz version)"
PREV_REV="$(cz version --project)"

CZ_CMD=('cz')
if [[ $INPUT_DEBUG == 'true' ]]; then
CZ_CMD+=('--debug')
fi
if [[ $INPUT_NO_RAISE ]]; then
CZ_CMD+=('--no-raise' "$INPUT_NO_RAISE")
fi
CZ_CMD+=('bump' '--yes')
if [[ $INPUT_GPG_SIGN == 'true' ]]; then
CZ_CMD+=('--gpg-sign')
fi
if [[ $INPUT_DRY_RUN == 'true' ]]; then
CZ_CMD+=('--dry-run')
fi
Expand Down