mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
* ci: re-fetch before push to avoid force-push on translations_hotfix
If upstream/translations_hotfix moved forward while the script was
running (e.g., a concurrent run or manual push), git push would fail
with "behind remote". Re-fetch right before pushing and merge any new
remote commits with -X ours so our .po changes and the main.pot from
${HOTFIX_BRANCH} (set by the initial -X theirs merge) are preserved
without needing a force-push.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: define HOTFIX_BRANCH once as job env; pass it to sync script
version-16-hotfix is now declared as env.HOTFIX_BRANCH at the job level
so the checkout ref and the script argument both derive from the same
value. Quoting the GITHUB_WORKSPACE path guards against spaces on
self-hosted runners.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: define HOTFIX_BRANCH as job env and pass to sync script via env
Declares version-16-hotfix once as env.HOTFIX_BRANCH at the job level
so the checkout ref and the script both derive from the same value.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: read HOTFIX_BRANCH from env instead of hardcoding in script
Removes the hardcoded branch name from the script; reads it from the
HOTFIX_BRANCH env var set by the workflow. Fails immediately with a
clear message if the var is not set.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: use ls-remote to check branch existence instead of swallowing fetch errors
Replace `git fetch ... 2>/dev/null || true` + `git rev-parse --verify`
with `git ls-remote --exit-code --heads upstream translations_hotfix`.
ls-remote queries the remote directly so the check is never based on
stale local state, and real failures (auth, network) propagate through
set -e instead of being silently ignored. Applied to both the initial
branch setup and the pre-push re-fetch.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: rewrite orchestrator to dispatch runner per hotfix branch via matrix
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: add per-branch runner workflow for hotfix translation sync
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: generalise sync script to use APP_NAME and GITHUB_REPOSITORY
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: remove push trigger from runner workflow
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: rename working branch to sync_translations_{hotfix_branch}
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
37 lines
1.0 KiB
YAML
37 lines
1.0 KiB
YAML
# Orchestrator — lives on develop only.
|
|
#
|
|
# Triggers on the weekly schedule and dispatches the runner workflow on each
|
|
# hotfix branch listed in the matrix. To add or remove a branch, edit the
|
|
# matrix below.
|
|
#
|
|
# POT-change triggers are handled by the runner on each hotfix branch
|
|
# (run-hotfix-translation-sync.yml), since GitHub only evaluates a workflow
|
|
# from the branch that receives the push.
|
|
|
|
name: Sync translations to hotfix branches
|
|
|
|
on:
|
|
schedule:
|
|
# 10:00 UTC Monday
|
|
- cron: "0 10 * * 1"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
trigger-runners:
|
|
name: Trigger sync → ${{ matrix.hotfix_branch }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
hotfix_branch:
|
|
- version-16-hotfix
|
|
fail-fast: false
|
|
|
|
steps:
|
|
- name: Dispatch runner on ${{ matrix.hotfix_branch }}
|
|
run: |
|
|
gh workflow run run-hotfix-translation-sync.yml \
|
|
--repo "${{ github.repository }}" \
|
|
--ref "${{ matrix.hotfix_branch }}"
|
|
env:
|
|
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|