-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update dockerfile used in action * Remove git * lint * Add missing copy * Remove more things from the image
- Loading branch information
Showing
4 changed files
with
18 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,8 @@ jobs: | |
- name: Build and push | ||
uses: docker/[email protected] | ||
with: | ||
context: ./action | ||
context: . | ||
file: action/Dockerfile | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,26 @@ | ||
FROM python:3.11-alpine | ||
FROM python:3.12-alpine | ||
|
||
WORKDIR /hacs | ||
|
||
COPY . /hacs | ||
|
||
ENV PIP_EXTRA_INDEX_URL="https://wheels.home-assistant.io/musllinux-index/" | ||
|
||
RUN \ | ||
apk add --no-cache \ | ||
libffi-dev \ | ||
\ | ||
&& apk add --no-cache --virtual .build-deps \ | ||
apk add --no-cache --virtual .build-deps \ | ||
bash \ | ||
gcc \ | ||
git \ | ||
musl-dev \ | ||
\ | ||
&& git clone --quiet --depth 1 https://github.com/hacs/integration.git /hacs \ | ||
\ | ||
&& bash /hacs/scripts/install/pip_packages setuptools wheel \ | ||
\ | ||
&& bash /hacs/scripts/install/pip_packages homeassistant aiogithubapi async-timeout \ | ||
&& bash /hacs/scripts/install/pip_packages \ | ||
-r requirements_action.txt \ | ||
\ | ||
&& bash /hacs/scripts/install/frontend \ | ||
\ | ||
&& apk del --no-cache .build-deps > /dev/null 2>&1 \ | ||
\ | ||
&& rm -rf /var/cache/apk/* \ | ||
\ | ||
&& find /usr/local \( -type d -a -name test -o -name tests -o -name '__pycache__' \) -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) -exec rm -rf '{}' \; | ||
|
||
COPY ./action.py /hacs/action.py | ||
&& find /usr/local \( -type d -a -name test -o -name tests -o -name '__pycache__' \) -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) -exec rm -rf '{}' \; \ | ||
\ | ||
&& cp /hacs/action/action.py /hacs/action.py | ||
|
||
ENTRYPOINT ["python3", "/hacs/action.py"] | ||
ENTRYPOINT ["python3", "/hacs/action.py"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
aiogithubapi>=21.11.0 | ||
async-timeout>=4.0.3 | ||
homeassistant==2024.3.3 |