From a638fc879a5552a2c0d47908766bcfa16195d464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=96=E5=A5=B3=E5=AD=A9=E7=9A=84=E5=B0=8F=E7=81=AB?= =?UTF-8?q?=E6=9F=B4?= <44471469+Erope@users.noreply.github.com> Date: Thu, 8 Jul 2021 02:35:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0ARM=E7=9A=84dashboard?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dashboard.yml | 34 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/dashboard.yml b/.github/workflows/dashboard.yml index bcf59c4..d200152 100644 --- a/.github/workflows/dashboard.yml +++ b/.github/workflows/dashboard.yml @@ -33,27 +33,27 @@ jobs: run: | go env go test -v ./... - - - name: Build dasbboard image + + - name: Set up image name + run: | + GHRC_IMAGE_NAME=$(echo "ghcr.io/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]') + if [ ${{ github.repository_owner }} = "naiba" ] + then ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/naibahq/nezha-dashboard") + else ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]') + fi + echo "::set-env name=GHRC_IMAGE_NAME::$GHRC_IMAGE_NAME" + echo "::set-env name=ALI_IMAGE_NAME::$ALI_IMAGE_NAME" + + - name: Build dasbboard image And Push uses: docker/build-push-action@v2 with: context: . file: ./Dockerfile - platforms: linux/amd64,linux/arm64,linux/arm - push: false - tags: nezha-dasbboard - - - name: Push dasbboard image - run: | - GHRC_IMAGE_NAME=$(echo "ghcr.io/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]') - if [ ${{ github.repository_owner }} = "naiba" ] - then ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/naibahq/nezha-dashboard") - else ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]') - fi - docker tag nezha-dasbboard $GHRC_IMAGE_NAME - docker tag nezha-dasbboard $ALI_IMAGE_NAME - docker push $GHRC_IMAGE_NAME - docker push $ALI_IMAGE_NAME + platforms: linux/amd64,linux/arm64,linux/arm,linux/386 + push: true + tags: | + ${{ GHRC_IMAGE_NAME }} + ${{ ALI_IMAGE_NAME }} - name: Purge jsdelivr cache run: |