Skip to content

Commit

Permalink
test docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
chendelin1982 authored Dec 8, 2023
1 parent 814c80e commit 4b68059
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 10 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,22 @@ jobs:
echo "DOCKERFILE=docker/$APP/Dockerfile" >> $GITHUB_ENV
echo "DIRECTORY=docker/$APP" >> $GITHUB_ENV
echo "README=docker/$APP/README.md" >> $GITHUB_ENV
##------------ special task for apphub begin----------------------#
- name: Trigger media.yml workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Media Action
token: ${{ secrets.GITHUB_TOKEN }}
if: env.APP == 'apphub'

- name: Download media.zip from artifacts
uses: actions/download-artifact@v2
with:
name: media
path: ${{env.DIRECTORY}}
if: env.APP == 'apphub'
##------------ special task for apphub end----------------------#

- name: Build & push Docker image
uses: mr-smithers-excellent/docker-build-push@v6
Expand Down
22 changes: 13 additions & 9 deletions docker/apphub/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# modify time: 2023120081104, you can modify here to trigger Docker Build action
# modify time: 202312081532, you can modify here to trigger Docker Build action

FROM python:3.10-slim-bullseye
LABEL maintainer="Websoft9<[email protected]>"
Expand All @@ -9,23 +9,27 @@ WORKDIR /websoft9
ENV LIBRARY_VERSION=0.5.18
ENV MEDIA_VERSION=0.0.7
ENV websoft9_repo="https://github.com/Websoft9/websoft9"
ENV docker_library_repo="https://github.com/Websoft9/docker-library"
ENV media_repo="https://github.com/Websoft9/media"
ENV websoft9_artifact="https://w9artifact.blob.core.windows.net/release/websoft9"
ENV library_repo="https://github.com/Websoft9/docker-library"
ENV source_github_pages="https://websoft9.github.io/websoft9"

RUN apt update && apt install -y --no-install-recommends curl git jq cron iproute2 supervisor rsync wget unzip zip && \
# Prepare source files
git clone --depth=1 $docker_library
# Prepare library
git clone --depth=1 $library_repo \
mv docker-library w9library && \
rm -rf w9library/.github && \

wget $media_repo/archive/refs/tags/$MEDIA_VERSION.zip -O ./media.zip && \
unzip media.zip && \
mv media-* w9media && \
rm -rf w9media/.github && \
# Prepare media
if [ ! -f ./media.zip ]; then \
wget $websoft9_artifact/plugin/media/media-latest.zip -O ./media.zip && \
unzip media.zip \
fi \
mv media* w9media \

git clone --depth=1 https://github.com/swagger-api/swagger-ui.git && \
wget https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js && \
cp redoc.standalone.js swagger-ui/dist && \

git clone --depth=1 $websoft9_repo ./w9source && \
cp -r ./w9media ./media && \
cp -r ./w9library ./library && \
Expand Down

0 comments on commit 4b68059

Please sign in to comment.