Skip to content

Commit

Permalink
Add nightly frontend to nightly builds (#74327)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed Jul 2, 2022
1 parent 2464322 commit 6f67ae1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/builder.yml
Expand Up @@ -102,6 +102,17 @@ jobs:
- name: Checkout the repository
uses: actions/checkout@v3.0.2

- name: Download nightly wheels of frontend
if: needs.init.outputs.channel == 'dev'
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
repo: home-assistant/frontend
branch: dev
workflow: nightly.yml
workflow_conclusion: success
name: wheels

- name: Set up Python ${{ env.DEFAULT_PYTHON }}
if: needs.init.outputs.channel == 'dev'
uses: actions/setup-python@v4.0.0
Expand All @@ -116,6 +127,19 @@ jobs:
python3 -m pip install --use-deprecated=legacy-resolver .
version="$(python3 script/version_bump.py nightly)"
if [[ "$(ls home_assistant_frontend*.whl)" =~ ^home_assistant_frontend-(.*)-py3-none-any.whl$ ]]; then
echo "Found frontend wheel, setting version to: ${BASH_REMATCH[1]}"
frontend_version="${BASH_REMATCH[1]}" yq \
--inplace e -o json \
'.requirements = ["home-assistant-frontend=="+env(frontend_version)]' \
homeassistant/components/frontend/manifest.json
sed -i "s|home-assistant-frontend==.*|home-assistant-frontend==${BASH_REMATCH[1]}|" \
homeassistant/package_constraints.txt
python -m script.gen_requirements_all
fi
- name: Write meta info file
shell: bash
run: |
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile
Expand Up @@ -13,9 +13,12 @@ COPY homeassistant/package_constraints.txt homeassistant/homeassistant/
RUN \
pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
-r homeassistant/requirements.txt --use-deprecated=legacy-resolver
COPY requirements_all.txt homeassistant/
COPY requirements_all.txt home_assistant_frontend-* homeassistant/
RUN \
pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
if ls homeassistant/home_assistant_frontend*.whl 1> /dev/null 2>&1; then \
pip3 install --no-cache-dir --no-index homeassistant/home_assistant_frontend-*.whl; \
fi \
&& pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
-r homeassistant/requirements_all.txt --use-deprecated=legacy-resolver

## Setup Home Assistant Core
Expand Down

0 comments on commit 6f67ae1

Please sign in to comment.