From efe721cf009a5c7dc574f55b2e74f47e4ead36b4 Mon Sep 17 00:00:00 2001 From: Colgrave Date: Fri, 24 Jan 2025 12:38:53 +0000 Subject: [PATCH] Add commit settings to Butane and git-sync (#71) This PR adds commit settings to Butane's git-push action. I did more testing, found out that `commit` is mandatory for pushing it to the remote repo after any changes, otherwise there won't be anything being pushed. This is mainly my mistake for not testing it properly on the last [PR #66](https://codeberg.org/Codeberg-CI/examples/pulls/66). Further more adds comments and options for using `drone-git-push`. Best, Reviewed-on: https://codeberg.org/Codeberg-CI/examples/pulls/71 Reviewed-by: Patrick Schratz Co-authored-by: Colgrave Co-committed-by: Colgrave --- Butane/.woodpecker/butane.yaml | 6 ++++++ Git/.woodpecker.yaml | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Butane/.woodpecker/butane.yaml b/Butane/.woodpecker/butane.yaml index 74e04e0..99ae6d0 100644 --- a/Butane/.woodpecker/butane.yaml +++ b/Butane/.woodpecker/butane.yaml @@ -19,9 +19,15 @@ steps: - bash ./script.sh - name: push + # for more information about plugin settings, please refer to + # https://github.com/appleboy/drone-git-push/blob/master/DOCS.md image: docker.io/appleboy/drone-git-push settings: ssh_key: from_secret: ssh_key remote: git@codeberg.org:.git branch: main + commit: true + # force: boolean, force push using the `--force` flag, defaults to false + # commit_message: add a custom message for commit, if it is omitted, it will be `[skip ci] Commit dirty state` + # empty_commit: boolean, if you only want generate an empty commit, you can do it using this option diff --git a/Git/.woodpecker.yaml b/Git/.woodpecker.yaml index 8de0f95..97cc261 100644 --- a/Git/.woodpecker.yaml +++ b/Git/.woodpecker.yaml @@ -1,6 +1,8 @@ # Git/.woodpecker.yaml # # CI step to automatic synchronization with an upstream repository. +# +# [drone-git-push](https://github.com/appleboy/drone-git-push) when: event: [cron, manual] @@ -16,9 +18,15 @@ steps: - git merge upstream/main - name: push + # for more information about plugin settings, please refer to + # https://github.com/appleboy/drone-git-push/blob/master/DOCS.md image: docker.io/appleboy/drone-git-push:latest settings: ssh_key: from_secret: ssh_key - remote: git@codeberg.org: + remote: git@codeberg.org:.git branch: main + commit: true + # force: boolean, force push using the `--force` flag, defaults to false + # commit_message: add a custom message for commit, if it is omitted, it will be `[skip ci] Commit dirty state` + # empty_commit: boolean, if you only want generate an empty commit, you can do it using this option