test docker build

This commit is contained in:
Darren 2023-12-08 15:32:24 +08:00 committed by GitHub
parent 814c80eff8
commit 4b68059cdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 10 deletions

View file

@ -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

View file

@ -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<help@websoft9.com>"
@ -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 && \