Skip to content

Commit

Permalink
ci: fix make pull on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mickamy committed Jan 7, 2024
1 parent 474de4a commit bb2c4ba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_and_push_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bb2c4ba

Please sign in to comment.