Skip to content

feat: add translation-sync reusable workflow#24

Merged
DeepDiver1975 merged 13 commits intomainfrom
add-translation-sync
Apr 9, 2026
Merged

feat: add translation-sync reusable workflow#24
DeepDiver1975 merged 13 commits intomainfrom
add-translation-sync

Conversation

@DeepDiver1975
Copy link
Copy Markdown
Member

@DeepDiver1975 DeepDiver1975 commented Apr 8, 2026

Summary

Adds a reusable translation-sync workflow that can be called from any ownCloud app repository to sync translations with Transifex. Uses a GitHub App token for pull request creation so that created pull requests trigger workflows and commits are signed and attributed to the bot identity rather than github-actions[bot].

Inputs

Input Required Default Description
mode yes old, make, or native
branch no master Branch to open the translations pull request against
sub_path no l10n Path within the repo where translation files live (e.g. l10n or .)
package_manager no npm npm or pnpm (make mode only)

Secrets

Secret Description
TX_TOKEN Transifex API token
TRANSLATION_APP_ID GitHub App ID used to open translation pull requests
TRANSLATION_APP_PRIVATE_KEY GitHub App private key

Pull request behaviour

  • A fixed branch name (chore/translations-update) means an open pull request is reused on subsequent sync runs rather than opening duplicates
  • Merging deletes the branch; a fresh pull request is opened on the next run with changes
  • No changes → no pull request created or updated
  • Commits are signed via peter-evans/create-pull-request sign-commits: true
  • Pull request creation is gated to the target branch, so workflow triggers on other refs only exercise the translation steps

Example caller

jobs:
  sync:
    uses: owncloud/reusable-workflows/.github/workflows/translation-sync.yml@main
    with:
      mode: old
      sub_path: l10n
    secrets:
      TX_TOKEN: ${{ secrets.TX_TOKEN }}
      TRANSLATION_APP_ID: ${{ secrets.TRANSLATION_APP_ID }}
      TRANSLATION_APP_PRIVATE_KEY: ${{ secrets.TRANSLATION_APP_PRIVATE_KEY }}

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
DeepDiver1975 and others added 12 commits April 8, 2026 23:31
Replace direct push with peter-evans/create-pull-request so that
branch protection on master is respected. A fixed branch name
(chore/translations-update) means an open PR is reused on subsequent
daily runs; merging deletes the branch so a fresh PR is opened next
time there are changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Generate a short-lived installation token via
actions/create-github-app-token so that created PRs trigger
workflows and the app identity is used instead of github-actions[bot].

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
GITHUB_TOKEN only needs the default read access now that all
privileged operations use the GitHub App token.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@DeepDiver1975 DeepDiver1975 requested a review from mmattel April 9, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants