enhancement(ci): sync translations

This commit is contained in:
Florian Schade
2025-07-09 13:32:46 +02:00
parent d52329708d
commit 08159e679c
2 changed files with 55 additions and 0 deletions

View File

@@ -3,3 +3,5 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.23.4
require github.com/gosexy/gettext v0.0.0-20160830220431-74466a0a0c4a // go-xgettext
require github.com/jessevdk/go-flags v1.6.1 // indirect

View File

@@ -27,6 +27,7 @@ OC_UBUNTU = "owncloud/ubuntu:20.04"
ONLYOFFICE_DOCUMENT_SERVER = "onlyoffice/documentserver:7.5.1"
PLUGINS_DOCKER_BUILDX = "woodpeckerci/plugin-docker-buildx:latest"
PLUGINS_GITHUB_RELEASE = "woodpeckerci/plugin-release"
PLUGINS_GIT_ACTION = "quay.io/thegeeklab/wp-git-action"
PLUGINS_S3 = "plugins/s3:1"
PLUGINS_S3_CACHE = "plugins/s3-cache:1"
PLUGINS_SLACK = "plugins/slack:1"
@@ -430,6 +431,9 @@ def main(ctx):
none
"""
if ctx.build.event == "cron" and ctx.build.sender == "translation-sync":
return translation_sync(ctx)
build_release_helpers = \
readyReleaseGo()
@@ -2143,6 +2147,55 @@ def skipIfUnchanged(ctx, type):
return skip
def translation_sync(ctx):
return [{
"name": "translation-sync",
"steps": [
{
"name": "translation-update",
"image": OC_CI_GOLANG,
"commands": [
"make l10n-read",
"curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash",
". ~/.profile",
"make l10n-push",
"make l10n-pull",
"rm tx",
"make l10n-clean",
],
"environment": {
"TX_TOKEN": {
"from_secret": "tx_token",
},
},
},
{
"name": "translation-push",
"image": PLUGINS_GIT_ACTION,
"settings": {
"action": ["commit", "push"],
"branch": ctx.build.branch,
"message": "[tx] updated from transifex",
"author_name": "opencloudeu",
"author_email": "devops@opencloud.eu",
"netrc_username": {
"from_secret": "github_username",
},
"netrc_password": {
"from_secret": "github_token",
},
"empty_commit": False,
},
},
],
"when": [
{
"event": "cron",
"cron": "translation-sync",
}
],
}]
def example_deploys(ctx):
on_merge_deploy = [
"opencloud_full/master.yml",