Merge pull request 'fix(ci): sign docs-regen commits with dedicated bot GPG key' (#145) from fix/ci-commit-signing into main
This commit was merged in pull request #145.
This commit is contained in:
@@ -127,9 +127,24 @@ jobs:
|
|||||||
--commit-dirty=true
|
--commit-dirty=true
|
||||||
|
|
||||||
- name: Commit generated docs
|
- name: Commit generated docs
|
||||||
|
env:
|
||||||
|
BOT_GPG_KEY: ${{ secrets.CI_GPG_PRIVATE_KEY }}
|
||||||
run: |
|
run: |
|
||||||
git config user.name "Gitea Actions"
|
# actions@gitea was never a verified email on any account, so
|
||||||
git config user.email "actions@gitea"
|
# these commits could never show as signed/verified regardless
|
||||||
|
# of server config. fishconfig-bot is a dedicated Gitea account
|
||||||
|
# (verified email, no login) that owns this key; the private
|
||||||
|
# key lives only in the CI_GPG_PRIVATE_KEY repo secret.
|
||||||
|
export GNUPGHOME="$(mktemp -d)"
|
||||||
|
chmod 700 "$GNUPGHOME"
|
||||||
|
echo "pinentry-mode loopback" > "$GNUPGHOME/gpg.conf"
|
||||||
|
echo "allow-loopback-pinentry" > "$GNUPGHOME/gpg-agent.conf"
|
||||||
|
command -v gpg >/dev/null || sudo apt-get install -y --no-install-recommends gnupg
|
||||||
|
echo "$BOT_GPG_KEY" | gpg --batch --import
|
||||||
|
git config user.name "Gitea Actions Bot"
|
||||||
|
git config user.email "fishconfig-bot@git.rootiest.dev"
|
||||||
|
git config user.signingkey 0603CD87750C18FB3604147EFD08763FA41E5534
|
||||||
|
git config commit.gpgsign true
|
||||||
git add docs/fish-config.md docs/fish-config.1 conf.d/__fish_config_op_registry.fish
|
git add docs/fish-config.md docs/fish-config.1 conf.d/__fish_config_op_registry.fish
|
||||||
git diff --cached --quiet && echo "No changes to commit" && exit 0
|
git diff --cached --quiet && echo "No changes to commit" && exit 0
|
||||||
git commit -m "chore(docs): regenerate manual, man page, and component registry"
|
git commit -m "chore(docs): regenerate manual, man page, and component registry"
|
||||||
|
|||||||
Reference in New Issue
Block a user