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

feat: allow verified commits #110

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ inputs:
description: If true it will sign-off commit
required: false
default: "false"
git-commit-gpg-sign:
description: If true it will sign commit with GPG key
required: false
default: "false"
fail-on-diff:
description: Fail the job if there is any diff found between the generated output and existing file (ignored if `git-push` is set)
required: false
Expand All @@ -100,6 +104,7 @@ runs:
INPUT_INDENTION: ${{ inputs.indention }}
INPUT_GIT_PUSH: ${{ inputs.git-push }}
INPUT_GIT_COMMIT_MESSAGE: ${{ inputs.git-commit-message }}
INPUT_GIT_COMMIT_GPG_SIGN: ${{ inputs.git-commit-gpg-sign }}
INPUT_CONFIG_FILE: ${{ inputs.config-file }}
INPUT_FAIL_ON_DIFF: ${{ inputs.fail-on-diff }}
INPUT_GIT_PUSH_SIGN_OFF: ${{ inputs.git-push-sign-off }}
Expand Down
4 changes: 4 additions & 0 deletions src/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ git_commit() {
args+=("-s")
fi

if [ "${INPUT_GIT_COMMIT_GPG_SIGN}" = "true" ]; then
args+=("-S")
fi

git commit "${args[@]}"
}

Expand Down