JH: fix workflow cosing meta package #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: JH Translations | |
# yamllint disable-line rule:truthy | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- dev | |
- dev-jethub | |
- master | |
- master-jethub | |
paths: | |
- "**strings.json" | |
env: | |
DEFAULT_PYTHON: "3.10" | |
jobs: | |
upload: | |
name: Upload | |
if: github.repository_owner == 'jethub-homeassistant' | |
runs-on: ${{ vars.RUNNER }} | |
steps: | |
- name: Checkout the repository | |
uses: actions/[email protected] | |
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
- name: Prepare Translations | |
run: | | |
python3 -m script.jhtranslations upload | |
- name: Get translated resources from current HA core dev | |
run: | | |
VERSION=$(curl -s https://version.home-assistant.io/dev.json | jq -r '.homeassistant."qemuarm-64"') | |
docker create --name temp-core ghcr.io/home-assistant/aarch64-homeassistant:$VERSION | |
docker cp temp-core:"/usr/src/homeassistant/build/translations-download/" build/translations-download/ | |
docker rm temp-core | |
- name: Upload Translations | |
uses: transifex/cli-action@v2 | |
with: | |
token: ${{ secrets.TX_TOKEN }} | |
args: push -s -t -a |