mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Download translations only once in the build pipeline (#114335)
This commit is contained in:
parent
afcc4b58f4
commit
acb9eb4818
63
.github/workflows/builder.yml
vendored
63
.github/workflows/builder.yml
vendored
@ -51,6 +51,32 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
ignore-dev: true
|
ignore-dev: true
|
||||||
|
|
||||||
|
- name: Fail if translations files are checked in
|
||||||
|
run: |
|
||||||
|
files=$(find homeassistant/components/*/translations -type f)
|
||||||
|
|
||||||
|
if [ -n "$files" ]; then
|
||||||
|
echo "Translations files are checked in, please remove the following files:"
|
||||||
|
echo "$files"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Download Translations
|
||||||
|
run: python3 -m script.translations download
|
||||||
|
env:
|
||||||
|
LOKALISE_TOKEN: ${{ secrets.LOKALISE_TOKEN }}
|
||||||
|
|
||||||
|
- name: Archive translations
|
||||||
|
shell: bash
|
||||||
|
run: find ./homeassistant/components/*/translations -name "*.json" | tar zcvf translations.tar.gz -T -
|
||||||
|
|
||||||
|
- name: Upload translations
|
||||||
|
uses: actions/upload-artifact@v4.3.1
|
||||||
|
with:
|
||||||
|
name: translations
|
||||||
|
path: translations.tar.gz
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
build_base:
|
build_base:
|
||||||
name: Build ${{ matrix.arch }} base core image
|
name: Build ${{ matrix.arch }} base core image
|
||||||
if: github.repository_owner == 'home-assistant'
|
if: github.repository_owner == 'home-assistant'
|
||||||
@ -159,10 +185,15 @@ jobs:
|
|||||||
# are not available.
|
# are not available.
|
||||||
sed -i "s|aiohttp-zlib-ng|aiohttp-zlib-ng\[isal\]|g" requirements_all.txt
|
sed -i "s|aiohttp-zlib-ng|aiohttp-zlib-ng\[isal\]|g" requirements_all.txt
|
||||||
|
|
||||||
- name: Download Translations
|
- name: Download translations
|
||||||
run: python3 -m script.translations download
|
uses: actions/download-artifact@v4.1.4
|
||||||
env:
|
with:
|
||||||
LOKALISE_TOKEN: ${{ secrets.LOKALISE_TOKEN }}
|
name: translations
|
||||||
|
|
||||||
|
- name: Extract translations
|
||||||
|
run: |
|
||||||
|
tar xvf translations.tar.gz
|
||||||
|
rm translations.tar.gz
|
||||||
|
|
||||||
- name: Write meta info file
|
- name: Write meta info file
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -186,17 +217,6 @@ jobs:
|
|||||||
--target /data \
|
--target /data \
|
||||||
--generic ${{ needs.init.outputs.version }}
|
--generic ${{ needs.init.outputs.version }}
|
||||||
|
|
||||||
- name: Archive translations
|
|
||||||
shell: bash
|
|
||||||
run: find ./homeassistant/components/*/translations -name "*.json" | tar zcvf translations.tar.gz -T -
|
|
||||||
|
|
||||||
- name: Upload translations
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: translations
|
|
||||||
path: translations.tar.gz
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
build_machine:
|
build_machine:
|
||||||
name: Build ${{ matrix.machine }} machine core image
|
name: Build ${{ matrix.machine }} machine core image
|
||||||
if: github.repository_owner == 'home-assistant'
|
if: github.repository_owner == 'home-assistant'
|
||||||
@ -448,10 +468,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: ${{ env.DEFAULT_PYTHON }}
|
python-version: ${{ env.DEFAULT_PYTHON }}
|
||||||
|
|
||||||
- name: Download Translations
|
- name: Download translations
|
||||||
run: python3 -m script.translations download
|
uses: actions/download-artifact@v4.1.4
|
||||||
env:
|
with:
|
||||||
LOKALISE_TOKEN: ${{ secrets.LOKALISE_TOKEN }}
|
name: translations
|
||||||
|
|
||||||
|
- name: Extract translations
|
||||||
|
run: |
|
||||||
|
tar xvf translations.tar.gz
|
||||||
|
rm translations.tar.gz
|
||||||
|
|
||||||
- name: Build package
|
- name: Build package
|
||||||
shell: bash
|
shell: bash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user