Skip to content

Commit 08b33cc

Browse files
bramkragtenclaude
andauthored
Decouple translations artifact from the nightly build (#53602)
* Skip backend translations download in nightly build The nightly only builds the app (build-app), which does not merge backend translations — the shipped app fetches those from core at runtime. The backend Lokalise export is a whole-project download across all languages and the slowest part of the translations step. Skipping it, as the release already does, cuts several minutes off every nightly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Decouple translations artifact into a parallel job The full translations (including the slow Lokalise backend/core export) are only needed for the uploaded `translations` artifact, not the wheel: build-app does not merge backend translations. Move that download and the artifact upload into a separate `translations` job that runs in parallel with the build, so the backend export no longer sits on the build's critical path. Both jobs run in the same workflow run, so consumers still find both the `wheels` and `translations` artifacts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 048e754 commit 08b33cc

1 file changed

Lines changed: 30 additions & 3 deletions

File tree

.github/workflows/nightly.yaml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ jobs:
3838
run: ./script/translations_download
3939
env:
4040
LOKALISE_TOKEN: ${{ secrets.LOKALISE_TOKEN }}
41+
# The wheel only builds the app (build-app), which does not merge
42+
# backend translations. Skipping the whole-project backend export (as
43+
# the release does) keeps this off the build's critical path; the full
44+
# translations artifact is produced in parallel by the job below.
45+
SKIP_BACKEND_TRANSLATIONS: "1"
4146

4247
- name: Bump version
4348
run: script/version_bump.js nightly
@@ -74,16 +79,38 @@ jobs:
7479
path: .compress-cache
7580
key: compress-cache-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }}
7681

77-
- name: Archive translations
78-
run: tar -czvf translations.tar.gz translations
79-
8082
- name: Upload build artifacts
8183
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
8284
with:
8385
name: wheels
8486
path: dist/home_assistant_frontend*.whl
8587
if-no-files-found: error
8688

89+
# The full translations (including the slow backend/core export) are only
90+
# needed for the uploaded artifact, not the wheel, so they are downloaded in
91+
# parallel here instead of blocking the build above.
92+
translations:
93+
name: Translations
94+
runs-on: ubuntu-latest
95+
steps:
96+
- name: Checkout the repository
97+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
98+
with:
99+
persist-credentials: false
100+
101+
- name: Setup Node and install
102+
uses: ./.github/actions/setup
103+
with:
104+
immutable: false
105+
106+
- name: Download translations
107+
run: ./script/translations_download
108+
env:
109+
LOKALISE_TOKEN: ${{ secrets.LOKALISE_TOKEN }}
110+
111+
- name: Archive translations
112+
run: tar -czvf translations.tar.gz translations
113+
87114
- name: Upload translations
88115
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
89116
with:

0 commit comments

Comments
 (0)