From 5a4d1f35154043f35ec69895636bb6a0a0731715 Mon Sep 17 00:00:00 2001 From: rikasai233 Date: Sun, 19 Jan 2025 14:49:52 +0800 Subject: [PATCH 1/8] chore: support arm64 --- .github/workflows/upload_app_image.yml | 2 +- .github/workflows/upload_web_image.yml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/upload_app_image.yml b/.github/workflows/upload_app_image.yml index 94ed2a7..e7572bb 100644 --- a/.github/workflows/upload_app_image.yml +++ b/.github/workflows/upload_app_image.yml @@ -43,7 +43,7 @@ jobs: with: context: . file: ./Dockerfile - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 push: true tags: | ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest diff --git a/.github/workflows/upload_web_image.yml b/.github/workflows/upload_web_image.yml index 1e889e3..56897c3 100644 --- a/.github/workflows/upload_web_image.yml +++ b/.github/workflows/upload_web_image.yml @@ -32,11 +32,11 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Log in to Docker Hub uses: docker/login-action@v2 @@ -55,7 +55,7 @@ jobs: with: context: ./web file: ./web/Dockerfile-build - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 push: true tags: | ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest From 3339d5fadfa2380d8c2aed35e523b0657c362972 Mon Sep 17 00:00:00 2001 From: rikasai233 Date: Sun, 19 Jan 2025 15:17:57 +0800 Subject: [PATCH 2/8] chore: web build set npm mirror --- web/Dockerfile-build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/Dockerfile-build b/web/Dockerfile-build index 99304b2..0bf4ae5 100644 --- a/web/Dockerfile-build +++ b/web/Dockerfile-build @@ -6,8 +6,11 @@ WORKDIR /app # copy both 'package.json' and 'package-lock.json' (if available) COPY package*.json ./ +# 设置 yarn 配置 +RUN yarn config set registry https://registry.npmmirror.com \ + && yarn config set network-timeout 300000 + # install project dependencies -# RUN yarn install --registry https://registry.npm.taobao.org/ RUN yarn install # copy project files and folders to the current working directory (i.e. 'app' folder) From cc115a4cdc6f240d5c897c879e97d471bc9ffedc Mon Sep 17 00:00:00 2001 From: rikasai233 Date: Sun, 19 Jan 2025 15:56:02 +0800 Subject: [PATCH 3/8] chore: web build remove QEMU --- .github/workflows/upload_web_image.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/upload_web_image.yml b/.github/workflows/upload_web_image.yml index 56897c3..22bec55 100644 --- a/.github/workflows/upload_web_image.yml +++ b/.github/workflows/upload_web_image.yml @@ -32,11 +32,11 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 +# - name: Set up QEMU +# uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v1 - name: Log in to Docker Hub uses: docker/login-action@v2 From 4d00e1578abbf48e0eb48ae73684ae271168cdad Mon Sep 17 00:00:00 2001 From: rikasai233 Date: Sun, 19 Jan 2025 16:07:19 +0800 Subject: [PATCH 4/8] Revert "chore: web build set npm mirror" This reverts commit 3339d5fadfa2380d8c2aed35e523b0657c362972. --- web/Dockerfile-build | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/web/Dockerfile-build b/web/Dockerfile-build index 0bf4ae5..99304b2 100644 --- a/web/Dockerfile-build +++ b/web/Dockerfile-build @@ -6,11 +6,8 @@ WORKDIR /app # copy both 'package.json' and 'package-lock.json' (if available) COPY package*.json ./ -# 设置 yarn 配置 -RUN yarn config set registry https://registry.npmmirror.com \ - && yarn config set network-timeout 300000 - # install project dependencies +# RUN yarn install --registry https://registry.npm.taobao.org/ RUN yarn install # copy project files and folders to the current working directory (i.e. 'app' folder) From 04a88c5488b1688e63e5af309d2390f96461685f Mon Sep 17 00:00:00 2001 From: rikasai233 Date: Sun, 19 Jan 2025 16:19:32 +0800 Subject: [PATCH 5/8] chore: split different platform --- .github/workflows/upload_app_image.yml | 75 +++++++++++++++++++++-- .github/workflows/upload_web_image.yml | 85 +++++++++++++++++++++++--- 2 files changed, 146 insertions(+), 14 deletions(-) diff --git a/.github/workflows/upload_app_image.yml b/.github/workflows/upload_app_image.yml index e7572bb..c05d70a 100644 --- a/.github/workflows/upload_app_image.yml +++ b/.github/workflows/upload_app_image.yml @@ -12,12 +12,13 @@ on: - 'requirements.txt' - '!./web/**' jobs: - build_app_image: + build_amd64: runs-on: ubuntu-latest env: DOCKERHUB_USERNAME: rikasai DOCKER_REPOSITORY_NAME: fast-runner-backend + ARCH: amd64 steps: - name: Check out the repository @@ -38,13 +39,77 @@ jobs: GIT_TAG=$(git describe --tags --exact-match ${{ github.sha }} 2> /dev/null || echo "") echo "GIT_TAG=$GIT_TAG" >> $GITHUB_ENV - - name: Build APP Image + - name: Build AMD64 Image uses: docker/build-push-action@v2 with: context: . file: ./Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64 push: true tags: | - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest - ${{ env.GIT_TAG != '' && format('{0}/{1}:{2}', env.DOCKERHUB_USERNAME, env.DOCKER_REPOSITORY_NAME, env.GIT_TAG) || '' }} + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-amd64 + ${{ env.GIT_TAG != '' && format('{0}/{1}:{2}-amd64', env.DOCKERHUB_USERNAME, env.DOCKER_REPOSITORY_NAME, env.GIT_TAG) || '' }} + + - name: Create and push manifest + run: | + docker manifest create ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest \ + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-amd64 \ + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-arm64 || true + docker manifest push ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest || true + if [ ! -z "${{ env.GIT_TAG }}" ]; then + docker manifest create ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }} \ + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }}-amd64 \ + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }}-arm64 || true + docker manifest push ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }} || true + fi + + build_arm64: + runs-on: ubuntu-latest + + env: + DOCKERHUB_USERNAME: rikasai + DOCKER_REPOSITORY_NAME: fast-runner-backend + ARCH: arm64 + + steps: + - name: Check out the repository + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Get Git tag if exists + id: get_tag + run: | + GIT_TAG=$(git describe --tags --exact-match ${{ github.sha }} 2> /dev/null || echo "") + echo "GIT_TAG=$GIT_TAG" >> $GITHUB_ENV + + - name: Build ARM64 Image + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + platforms: linux/arm64 + push: true + tags: | + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-arm64 + ${{ env.GIT_TAG != '' && format('{0}/{1}:{2}-arm64', env.DOCKERHUB_USERNAME, env.DOCKER_REPOSITORY_NAME, env.GIT_TAG) || '' }} + + - name: Create and push manifest + run: | + docker manifest create ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest \ + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-amd64 \ + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-arm64 || true + docker manifest push ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest || true + if [ ! -z "${{ env.GIT_TAG }}" ]; then + docker manifest create ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }} \ + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }}-amd64 \ + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }}-arm64 || true + docker manifest push ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }} || true + fi diff --git a/.github/workflows/upload_web_image.yml b/.github/workflows/upload_web_image.yml index 22bec55..f801736 100644 --- a/.github/workflows/upload_web_image.yml +++ b/.github/workflows/upload_web_image.yml @@ -12,18 +12,17 @@ on: - '**/*.py' jobs: - build_and_push: + build_amd64: runs-on: ubuntu-latest - env: DOCKERHUB_USERNAME: rikasai DOCKER_REPOSITORY_NAME: fast-runner-frontend + ARCH: amd64 steps: - name: Check out the repository uses: actions/checkout@v4 - # Cache yarn dependencies - name: Cache yarn dependencies uses: actions/cache@v2 with: @@ -32,9 +31,64 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- -# - name: Set up QEMU -# uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Get Git tag if exists + id: get_tag + run: | + GIT_TAG=$(git describe --tags --exact-match ${{ github.sha }} 2> /dev/null || echo "") + echo "GIT_TAG=$GIT_TAG" >> $GITHUB_ENV + + - name: Build and push AMD64 Docker image + uses: docker/build-push-action@v2 + with: + context: ./web + file: ./web/Dockerfile-build + platforms: linux/amd64 + push: true + tags: | + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-amd64 + ${{ env.GIT_TAG != '' && format('{0}/{1}:{2}-amd64', env.DOCKERHUB_USERNAME, env.DOCKER_REPOSITORY_NAME, env.GIT_TAG) || '' }} + - name: Create and push manifest + run: | + docker manifest create ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest \ + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-amd64 \ + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-arm64 || true + docker manifest push ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest || true + if [ ! -z "${{ env.GIT_TAG }}" ]; then + docker manifest create ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }} \ + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }}-amd64 \ + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }}-arm64 || true + docker manifest push ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }} || true + fi + + build_arm64: + runs-on: ubuntu-latest + env: + DOCKERHUB_USERNAME: rikasai + DOCKER_REPOSITORY_NAME: fast-runner-frontend + ARCH: arm64 + + steps: + - name: Check out the repository + uses: actions/checkout@v4 + + - name: Cache yarn dependencies + uses: actions/cache@v2 + with: + path: ./web/node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 @@ -50,13 +104,26 @@ jobs: GIT_TAG=$(git describe --tags --exact-match ${{ github.sha }} 2> /dev/null || echo "") echo "GIT_TAG=$GIT_TAG" >> $GITHUB_ENV - - name: Build and push Docker image + - name: Build and push ARM64 Docker image uses: docker/build-push-action@v2 with: context: ./web file: ./web/Dockerfile-build - platforms: linux/amd64,linux/arm64 + platforms: linux/arm64 push: true tags: | - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest - ${{ env.GIT_TAG != '' && format('{0}/{1}:{2}', env.DOCKERHUB_USERNAME, env.DOCKER_REPOSITORY_NAME, env.GIT_TAG) || '' }} + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-arm64 + ${{ env.GIT_TAG != '' && format('{0}/{1}:{2}-arm64', env.DOCKERHUB_USERNAME, env.DOCKER_REPOSITORY_NAME, env.GIT_TAG) || '' }} + + - name: Create and push manifest + run: | + docker manifest create ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest \ + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-amd64 \ + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-arm64 || true + docker manifest push ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest || true + if [ ! -z "${{ env.GIT_TAG }}" ]; then + docker manifest create ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }} \ + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }}-amd64 \ + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }}-arm64 || true + docker manifest push ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }} || true + fi From 5b72f62c89421a57d2ed8187b50a46c24d590a3b Mon Sep 17 00:00:00 2001 From: rikasai233 Date: Sun, 19 Jan 2025 16:32:45 +0800 Subject: [PATCH 6/8] chore: web specify arm64 --- .github/workflows/upload_web_image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upload_web_image.yml b/.github/workflows/upload_web_image.yml index f801736..6e876ac 100644 --- a/.github/workflows/upload_web_image.yml +++ b/.github/workflows/upload_web_image.yml @@ -71,7 +71,7 @@ jobs: fi build_arm64: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04-arm env: DOCKERHUB_USERNAME: rikasai DOCKER_REPOSITORY_NAME: fast-runner-frontend From be83e9118fd56f51842dadf7f3c611978b16ae91 Mon Sep 17 00:00:00 2001 From: rikasai233 Date: Sun, 19 Jan 2025 16:36:28 +0800 Subject: [PATCH 7/8] chore: app specify arm64 --- .github/workflows/upload_app_image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upload_app_image.yml b/.github/workflows/upload_app_image.yml index c05d70a..007ff45 100644 --- a/.github/workflows/upload_app_image.yml +++ b/.github/workflows/upload_app_image.yml @@ -64,7 +64,7 @@ jobs: fi build_arm64: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04-arm env: DOCKERHUB_USERNAME: rikasai From 49304859a19f23459937c4dc92129e275214bcbc Mon Sep 17 00:00:00 2001 From: rikasai233 Date: Sun, 19 Jan 2025 17:07:52 +0800 Subject: [PATCH 8/8] chore: push arm64 latest image tag --- .github/workflows/upload_app_image.yml | 30 ++++---------------------- .github/workflows/upload_web_image.yml | 30 ++++---------------------- 2 files changed, 8 insertions(+), 52 deletions(-) diff --git a/.github/workflows/upload_app_image.yml b/.github/workflows/upload_app_image.yml index 007ff45..c23f6b8 100644 --- a/.github/workflows/upload_app_image.yml +++ b/.github/workflows/upload_app_image.yml @@ -47,22 +47,11 @@ jobs: platforms: linux/amd64 push: true tags: | + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-amd64 + ${{ env.GIT_TAG != '' && format('{0}/{1}:{2}', env.DOCKERHUB_USERNAME, env.DOCKER_REPOSITORY_NAME, env.GIT_TAG) || '' }} ${{ env.GIT_TAG != '' && format('{0}/{1}:{2}-amd64', env.DOCKERHUB_USERNAME, env.DOCKER_REPOSITORY_NAME, env.GIT_TAG) || '' }} - - name: Create and push manifest - run: | - docker manifest create ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest \ - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-amd64 \ - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-arm64 || true - docker manifest push ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest || true - if [ ! -z "${{ env.GIT_TAG }}" ]; then - docker manifest create ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }} \ - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }}-amd64 \ - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }}-arm64 || true - docker manifest push ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }} || true - fi - build_arm64: runs-on: ubuntu-24.04-arm @@ -98,18 +87,7 @@ jobs: platforms: linux/arm64 push: true tags: | + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-arm64 + ${{ env.GIT_TAG != '' && format('{0}/{1}:{2}', env.DOCKERHUB_USERNAME, env.DOCKER_REPOSITORY_NAME, env.GIT_TAG) || '' }} ${{ env.GIT_TAG != '' && format('{0}/{1}:{2}-arm64', env.DOCKERHUB_USERNAME, env.DOCKER_REPOSITORY_NAME, env.GIT_TAG) || '' }} - - - name: Create and push manifest - run: | - docker manifest create ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest \ - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-amd64 \ - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-arm64 || true - docker manifest push ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest || true - if [ ! -z "${{ env.GIT_TAG }}" ]; then - docker manifest create ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }} \ - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }}-amd64 \ - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }}-arm64 || true - docker manifest push ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }} || true - fi diff --git a/.github/workflows/upload_web_image.yml b/.github/workflows/upload_web_image.yml index 6e876ac..edc49aa 100644 --- a/.github/workflows/upload_web_image.yml +++ b/.github/workflows/upload_web_image.yml @@ -54,22 +54,11 @@ jobs: platforms: linux/amd64 push: true tags: | + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-amd64 + ${{ env.GIT_TAG != '' && format('{0}/{1}:{2}', env.DOCKERHUB_USERNAME, env.DOCKER_REPOSITORY_NAME, env.GIT_TAG) || '' }} ${{ env.GIT_TAG != '' && format('{0}/{1}:{2}-amd64', env.DOCKERHUB_USERNAME, env.DOCKER_REPOSITORY_NAME, env.GIT_TAG) || '' }} - - name: Create and push manifest - run: | - docker manifest create ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest \ - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-amd64 \ - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-arm64 || true - docker manifest push ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest || true - if [ ! -z "${{ env.GIT_TAG }}" ]; then - docker manifest create ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }} \ - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }}-amd64 \ - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }}-arm64 || true - docker manifest push ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }} || true - fi - build_arm64: runs-on: ubuntu-22.04-arm env: @@ -112,18 +101,7 @@ jobs: platforms: linux/arm64 push: true tags: | + ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-arm64 + ${{ env.GIT_TAG != '' && format('{0}/{1}:{2}', env.DOCKERHUB_USERNAME, env.DOCKER_REPOSITORY_NAME, env.GIT_TAG) || '' }} ${{ env.GIT_TAG != '' && format('{0}/{1}:{2}-arm64', env.DOCKERHUB_USERNAME, env.DOCKER_REPOSITORY_NAME, env.GIT_TAG) || '' }} - - - name: Create and push manifest - run: | - docker manifest create ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest \ - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-amd64 \ - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest-arm64 || true - docker manifest push ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:latest || true - if [ ! -z "${{ env.GIT_TAG }}" ]; then - docker manifest create ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }} \ - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }}-amd64 \ - ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }}-arm64 || true - docker manifest push ${{ env.DOCKERHUB_USERNAME }}/${{ env.DOCKER_REPOSITORY_NAME }}:${{ env.GIT_TAG }} || true - fi