Skip to content

Commit

Permalink
test build
Browse files Browse the repository at this point in the history
  • Loading branch information
chendelin1982 authored Dec 11, 2023
1 parent 14ed83e commit 763248e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# When version include "-", it not divide version and build ony one test image
# It have enable multiPlatform, you add more platform at platform: linux/amd64...
# If you add more paths for trigger, please update app_list= at set-matrix for it also
# MEDIA_FROM environment: source | artifact, when use source get from contentful and oss, use artifact download media-latest from Websoft9 artifact

name: Build image to DockerHub

Expand Down Expand Up @@ -34,6 +35,9 @@ jobs:
build:
needs: setup
runs-on: ubuntu-latest
env:
# You can set it to choice where download from
MEDIA_FROM: "source"
strategy:
matrix: ${{fromJson(needs.setup.outputs.matrix)}}
steps:
Expand Down Expand Up @@ -78,19 +82,25 @@ jobs:
token: ${{github.token}}
run-id: dummy
wait-interval: PT10S
if: env.APP == 'apphub'
if: env.APP == 'apphub' && env.MEDIA_FROM == 'source'

- name: Reuse workflow run id
run: "echo ${{ steps.startAndWaitWorkflow.outputs.run-id }}"
if: env.APP == 'apphub'
if: env.APP == 'apphub' && env.MEDIA_FROM == 'source'

- name: Download media.zip from artifacts
uses: Legit-Labs/action-download-artifact@v2
with:
workflow: media.yml
name: media
path: ${{env.DIRECTORY}}
if: env.APP == 'apphub'
if: env.APP == 'apphub' && env.MEDIA_FROM == 'source'

- name: Download media-latest.zip from Websoft9 artifact
if: env.MEDIA_FROM == 'artifact'
run: |
curl -o media.zip https://w9artifact.blob.core.windows.net/release/websoft9/plugin/media/media-latest.zip
##------------ special task for apphub end----------------------#

- name: Build & push Docker image
Expand Down
2 changes: 1 addition & 1 deletion docker/apphub/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file can running at actions
# modify time: 202312111001, you can modify here to trigger Docker Build action
# modify time: 202312111004, you can modify here to trigger Docker Build action


FROM python:3.10-slim-bullseye
Expand Down

0 comments on commit 763248e

Please sign in to comment.