Skip to content

Commit

Permalink
Update dockerfile used in action
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Apr 12, 2024
1 parent 2a4be46 commit 83274f7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/action-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
3 changes: 1 addition & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ jobs:

- name: Build Container
run: |
cd action
docker build . -t hacs/action:local
docker build . -t hacs/action:local -f action/Dockerfile
- name: Run Action
run: |
Expand Down
15 changes: 8 additions & 7 deletions action/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
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 \
ls /hacs \
&& apk add --no-cache \
libffi-dev \
\
&& apk add --no-cache --virtual .build-deps \
Expand All @@ -12,8 +17,6 @@ RUN \
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 \
Expand All @@ -26,6 +29,4 @@ RUN \
\
&& 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

ENTRYPOINT ["python3", "/hacs/action.py"]
ENTRYPOINT ["python3", "/hacs/action.py"]

0 comments on commit 83274f7

Please sign in to comment.