From 9500fb2e1d3d9b8280f4fb443be6b1d6e2a19ae8 Mon Sep 17 00:00:00 2001 From: Darren <27513732@qq.com> Date: Fri, 15 Dec 2023 10:05:37 +0800 Subject: [PATCH] test release --- .github/workflows/docker.yml | 32 ++++++++++++++++++++++++++++++-- docker/apphub/Dockerfile | 3 +++ media/CHANGELOG.md | 8 ++++++++ media/media.json | 2 +- version.json | 4 ---- 5 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 media/CHANGELOG.md diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 393aad51..71a6e3aa 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,4 +1,6 @@ # This action is used for building websoft9 docker images to DockerHub at one time +# This action is also release Media and Libarary with build apphub image + # It need LABEL version="" at your dockerfile. And it can divide version. e.g version v3.4.0.3 will divide to latest,v3,v3.4,v3.4.0,v3.4.0.3 # 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... @@ -47,13 +49,16 @@ jobs: fetch-depth: 2 - name: Prepare tags and files for Docker build + id: convert_version run: | APP=${{ matrix.app }} TAG=$(grep 'LABEL version' "docker/$APP/Dockerfile" | cut -d'"' -f2 | xargs) echo $APP version is $TAG if [[ "$TAG" == *"-"* ]]; then TAGS="$TAG" + echo "CHANNEL=dev" >> $GITHUB_ENV else + echo "CHANNEL=release" >> $GITHUB_ENV IFS='.' read -ra PARTS <<< "$TAG" TAGS="latest" TAG_PART="" @@ -96,13 +101,36 @@ jobs: path: ${{env.DIRECTORY}} if: env.APP == 'apphub' && env.MEDIA_FROM == 'source' - - name: Download media-latest.zip from Websoft9 artifact - if: env.MEDIA_FROM == 'artifact' + - name: Download media-latest.zip from Websoft9 artifact run: | curl -o media.zip https://w9artifact.blob.core.windows.net/release/websoft9/plugin/media/media-latest.zip + if: env.MEDIA_FROM == 'artifact' + + # release media step1 + - name: Create more files + run: | + version_core=$(grep 'ARG MEDIA_VERSION' "docker/apphub/Dockerfile" | cut -d'"' -f2 | xargs) + cp ${{env.DIRECTORY}}/media.zip media/media-latest.zip + cp media/media-latest.zip media/media-$version_core.zip + jq --arg version "$version_core" '.Version = $version' media/media.json > media/temp.json && mv media/temp.json media/media.json + if: env.APP == 'apphub' && env.MEDIA_FROM == 'source' + + # release media step2 + - name: Upload To Azure Blob + uses: LanceMcCarthy/Action-AzureBlobUpload@v2 + with: + connection_string: ${{ secrets.AZURE_STORAGE_ARTIFACT }} + container_name: ${{ steps.convert_version.outputs.CHANNEL }} + source_folder: media/ + destination_folder: ./websoft9/plugin/media + delete_if_exists: true + fail_if_source_empty: true + if: env.APP == 'apphub' && env.MEDIA_FROM == 'source' ##------------ special task for apphub end----------------------# + + - name: Build & push Docker image uses: mr-smithers-excellent/docker-build-push@v6 with: diff --git a/docker/apphub/Dockerfile b/docker/apphub/Dockerfile index c78530e8..6cc67894 100644 --- a/docker/apphub/Dockerfile +++ b/docker/apphub/Dockerfile @@ -1,4 +1,5 @@ # This file can running at actions +# MEDIA_VERSION and LIBRARY_VERSION will trigger its release # modify time: 202312141910, you can modify here to trigger Docker Build action @@ -8,6 +9,8 @@ LABEL version="0.0.6" WORKDIR /websoft9 +ARG MEDIA_VERSION="0.0.9" +ARG LIBRARY_VERSION="0.5.21" ARG WEBSOFT9_REPO="https://github.com/Websoft9/websoft9" ARG WEBSOFT9_ARTIFACT="https://w9artifact.blob.core.windows.net/release/websoft9" ARG LIBRARY_REPO="https://github.com/Websoft9/docker-library" diff --git a/media/CHANGELOG.md b/media/CHANGELOG.md new file mode 100644 index 00000000..5ede1c15 --- /dev/null +++ b/media/CHANGELOG.md @@ -0,0 +1,8 @@ +## 0.0.9 release on 2023-12-14 +1. zentao,magento,wordpress version format update to contentful + +## 1.0.0-rc2 release on 2023-10-26 +1. media init + +## 1.0.0-rc1 release on 2023-10-26 +1. media init \ No newline at end of file diff --git a/media/media.json b/media/media.json index c0fee121..6732e3cc 100644 --- a/media/media.json +++ b/media/media.json @@ -3,7 +3,7 @@ "Repository": "https://github.com/Websoft9/plugin-media", "Update URI": "https://example.com/my-plugin/", "Description": "Wesoft9 application Logos, data and Screen shoot.", - "Version": "0.0.7", + "Version": "", "Requires at most": "1.9.0", "Requires at least": "0.0.2", "Author": "Websoft9 Inc", diff --git a/version.json b/version.json index cea4532d..4fd03dcd 100644 --- a/version.json +++ b/version.json @@ -9,10 +9,6 @@ "settings": "0.0.8", "navigator": "0.5.10" }, - "data": { - "media": "0.0.8", - "library": "0.5.20" - }, "OS": { "Fedora": [ "38",