From bb2c4ba5a2c3c31dcdf56f8ed2037ab2aa23ae80 Mon Sep 17 00:00:00 2001 From: mickamy Date: Sun, 7 Jan 2024 12:29:23 +0900 Subject: [PATCH] ci: fix make pull on ci --- .github/workflows/build_and_push_images.yml | 6 +++--- Makefile | 9 ++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_and_push_images.yml b/.github/workflows/build_and_push_images.yml index 79dd0e0e..8b56d784 100644 --- a/.github/workflows/build_and_push_images.yml +++ b/.github/workflows/build_and_push_images.yml @@ -26,7 +26,7 @@ jobs: with: username: ${{ env.UNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} - - run: make pull + - run: make pull-bench pull-base - name: Build and push bench image uses: docker/build-push-action@v5 with: @@ -74,14 +74,14 @@ jobs: with: username: ${{ env.UNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} - - run: make pull + - run: make pull-app - name: Build and push app image uses: docker/build-push-action@v5 with: context: . push: true file: ./docker/app/base/Dockerfile - tags: ${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}:latest,${{ env.UNAME }}/ishocon2-app-${{ github.sha }}:latest + tags: ${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}:latest,${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}-${{ github.sha }}:latest cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache platforms: linux/amd64,linux/arm64/v8 diff --git a/Makefile b/Makefile index fdcbf63e..3446a4b7 100644 --- a/Makefile +++ b/Makefile @@ -52,11 +52,18 @@ build-app: change-lang build-base build: build-bench build-app @echo "Build done." -pull: +pull-bench: docker pull $(UNAME)/ishocon2-bench:latest; + +pull-base: docker pull $(UNAME)/ishocon2-app-base:latest; + +pull-app: check-lang docker pull $(UNAME)/ishocon2-app-$(ISHOCON_APP_LANG):latest; +pull: pull-bench pull-base pull-app + @echo "Pull done." + push: docker push $(UNAME)/ishocon2-bench:latest; docker push $(UNAME)/ishocon2-app-base:latest;