aboutsummaryrefslogtreecommitdiff
path: root/.drone.yml
diff options
context:
space:
mode:
authorYarden Shoham2022-10-14 22:09:04 +0300
committerGitHub2022-10-14 15:09:04 -0400
commit94d6d93cc29dd8837d87e1aa58de8f52676d4963 (patch)
tree5d1c6187e53dd4cd76e92cb87e6afaae0e65a653 /.drone.yml
parent6bb6a108e0c03b323402b452fc05c6845f7d00df (diff)
Fix Drone pushing commits with wrong author info (#21450)
I don't know how to test this so I'll explain my thought process: After a discussion with @techknowlogick in https://github.com/go-gitea/gitea/commit/cda2c38f4a61ef7f448be3efab5420d9974c8474 I saw the CI config has this block: https://github.com/go-gitea/gitea/blob/cda2c38f4a61ef7f448be3efab5420d9974c8474/.drone.yml#L618-L630 I don't know much about Drone but after looking at [appleboy/drone-git-push](https://github.com/appleboy/drone-git-push)'s source code, I think each setting becomes an environment variable (e.g. `remote` to `PLUGIN_REMOTE`, `commit_message` to `PLUGIN_COMMIT_MESSAGE` etc...). Take a look at the code block loading the author info: https://github.com/appleboy/drone-git-push/blob/a69878c00665277c53fb38d6c5980221cb687935/main.go#L32-L42 Two environment variables are listed for each setting. This PR forces both to have the same value. Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
Diffstat (limited to '.drone.yml')
-rw-r--r--.drone.yml8
1 files changed, 6 insertions, 2 deletions
diff --git a/.drone.yml b/.drone.yml
index 1e21c43f3..8a73e84a0 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -626,6 +626,8 @@ steps:
commit_message: "[skip ci] Updated translations via Crowdin"
remote: "git@github.com:go-gitea/gitea.git"
environment:
+ DRONE_COMMIT_AUTHOR_EMAIL: "teabot@gitea.io"
+ DRONE_COMMIT_AUTHOR: GiteaBot
GIT_PUSH_SSH_KEY:
from_secret: git_push_ssh_key
@@ -670,12 +672,14 @@ steps:
pull: always
settings:
author_email: "teabot@gitea.io"
- author_name: GiteaBot
+ author_name: "GiteaBot"
branch: main
commit: true
- commit_message: "[skip ci] Updated licenses and gitignores "
+ commit_message: "[skip ci] Updated licenses and gitignores"
remote: "git@github.com:go-gitea/gitea.git"
environment:
+ DRONE_COMMIT_AUTHOR_EMAIL: "teabot@gitea.io"
+ DRONE_COMMIT_AUTHOR: "GiteaBot"
GIT_PUSH_SSH_KEY:
from_secret: git_push_ssh_key