Skip to content

Commit

Permalink
generate zip file in docker and keep it.
Browse files Browse the repository at this point in the history
  • Loading branch information
SciLor committed Dec 8, 2023
1 parent 50869be commit 222ef24
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/publish_docker_matrix_alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Run docker image and extract zipfile
run: |
docker run --rm --name extract-container ${{ env.REGISTRY_IMAGE }}:${{ github.sha }} cat /tmp/teddycloud.zip > /tmp/teddycloud.${{ matrix.platform }}.release.zip
- name: Export digest
run: |
mkdir -p /tmp/digests/${{ github.sha }}
Expand All @@ -105,6 +109,12 @@ jobs:
name: digests
path: /tmp/digests/${{ github.sha }}/*
if-no-files-found: error
- name: Upload release file
uses: actions/upload-artifact@v3
with:
name: release-${{ matrix.platform }}
path: /tmp/teddycloud.${{ matrix.platform }}.release.zip
if-no-files-found: error

merge-images:
runs-on: ubuntu-latest
Expand Down
6 changes: 4 additions & 2 deletions DockerfileAlpine
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apk --no-cache add gcc protobuf-c-dev build-base git
COPY . /buildenv
WORKDIR /buildenv
# No libsanitizie support in alpine and wrong definitions for PRIuTIME
RUN make preinstall NO_WARN_FAIL=1 NO_SANITIZERS=1
RUN make zip NO_WARN_FAIL=1 NO_SANITIZERS=1
#RUN make preinstall

# Use Alpine Linux as base image for the final image
Expand All @@ -27,13 +27,15 @@ RUN mkdir -p /teddycloud/certs \
&& mkdir -p /teddycloud/data/content/default \
&& mkdir -p /teddycloud/data/library \
&& mkdir -p /teddycloud/data/firmware \
&& mkdir -p /teddycloud/data/www
&& mkdir -p /teddycloud/data/www \
&& mkdir -p /tmp

# Copy files from the build environment
COPY --from=buildenv /buildenv/install/pre/certs/ /teddycloud/certs/
COPY --from=buildenv /buildenv/install/pre/data/www/ /teddycloud/data/www/
COPY --from=buildenv /buildenv/install/pre/*.sh /usr/local/bin/
COPY --from=buildenv /buildenv/install/pre/teddycloud /usr/local/bin/teddycloud
COPY --from=buildenv /buildenv/install/zip/release.zip /tmp/teddycloud.zip

# Set up volumes
VOLUME \
Expand Down

0 comments on commit 222ef24

Please sign in to comment.