From e4533e660148b04e662a2517428f37a876a30926 Mon Sep 17 00:00:00 2001 From: DarkSky Date: Thu, 11 Aug 2022 23:25:09 +0800 Subject: [PATCH] chore: ci --- .github/deployment/Dockerfile-affine-multiplatform | 4 +++- .github/workflows/affine.yml | 13 +++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/deployment/Dockerfile-affine-multiplatform b/.github/deployment/Dockerfile-affine-multiplatform index de0146219c..e005ca3ffd 100644 --- a/.github/deployment/Dockerfile-affine-multiplatform +++ b/.github/deployment/Dockerfile-affine-multiplatform @@ -1,4 +1,6 @@ -FROM relocate as relocate +ARG BASE_IMAGE=localhost:5000/toeverything/relocate:latest + +FROM ${BASE_IMAGE} as relocate # ============= # AFFiNE image diff --git a/.github/workflows/affine.yml b/.github/workflows/affine.yml index 968550e922..2e77314af3 100644 --- a/.github/workflows/affine.yml +++ b/.github/workflows/affine.yml @@ -19,6 +19,7 @@ env: NAMESPACE: toeverything AFFINE_IMAGE_NAME: AFFiNE IMAGE_TAG_LATEST: nightly-latest + LOCAL_CACHE: localhost:5000/toeverything/relocate:latest jobs: ligo-virgo: @@ -28,6 +29,12 @@ jobs: contents: read packages: write + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: - name: Checkout uses: actions/checkout@v2 @@ -57,9 +64,9 @@ jobs: uses: docker/build-push-action@v3 with: context: . - load: true + push: true file: ./.github/deployment/Dockerfile-affine - tags: relocate + tags: ${{ env.LOCAL_CACHE }} target: AFFiNE - name: Build and push Docker image (AFFINE-Local) @@ -72,3 +79,5 @@ jobs: tags: ${{ steps.meta_affine.outputs.tags }} labels: ${{ steps.meta_affine.outputs.labels }} target: AFFiNE + build-args: | + BASE_IMAGE=${{ env.LOCAL_CACHE }}