Skip to content

Commit a17549c

Browse files
committed
ci: try docker hub registory
1 parent df38a81 commit a17549c

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

.github/workflows/benchmark.yml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,45 @@ jobs:
2828
UNAME: ${{ github.actor }}
2929
steps:
3030
- uses: actions/checkout@v4
31-
- run: make change-lang LANG=$ISHOCON_APP_LANG
32-
- run: |
31+
- name: Replace base image in docker-compose.yml with github actor name
32+
run: |
33+
make change-lang
3334
sed -i 's/ishocon2-app-base/${{ env.UNAME }}\/ishocon2-app-base/g' ./docker-compose.yml
3435
cat ./docker-compose.yml
36+
- name: Set up Docker Buildx
37+
uses: docker/setup-buildx-action@v3
38+
- name: Login to Docker Hub
39+
uses: docker/login-action@v3
40+
with:
41+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
42+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
43+
- name: Build and push bench image
44+
uses: docker/build-push-action@v5
45+
with:
46+
context: .
47+
push: true
48+
file: ./docker/benchmarker/Dockerfile
49+
tags: ${{ env.UNAME }}/ishocon2-app-bench:latest
50+
cache-from: type=registry,ref=${{ env.UNAME }}/ishocon2-app-bench:latest
51+
cache-to: type=inline
52+
- name: Build and push base image
53+
uses: docker/build-push-action@v5
54+
with:
55+
context: .
56+
push: true
57+
file: ./docker/app/base/Dockerfile
58+
tags: ${{ env.UNAME }}/ishocon2-app-base:latest
59+
cache-from: type=registry,ref=${{ env.UNAME }}/ishocon2-app-base:latest
60+
cache-to: type=inline
61+
- name: Build and push app image
62+
uses: docker/build-push-action@v5
63+
with:
64+
context: .
65+
push: true
66+
tags: ${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}:latest
67+
file: ./docker/app/${{ env.ISHOCON_APP_LANG }}/Dockerfile
68+
cache-from: type=registry,ref=${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}:latestst
69+
cache-to: type=inline
3570
- run: make build
3671
timeout-minutes: 5
3772
- run: make up bench-with-db-init

0 commit comments

Comments
 (0)