Skip to content

Commit

Permalink
ci: replace base image in docker-compose.yml on ci (prepend an actor …
Browse files Browse the repository at this point in the history
…name)
  • Loading branch information
mickamy committed Jan 4, 2024
1 parent 42c11ec commit 1d2821a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,35 @@ jobs:
- "ruby"
env:
ISHOCON_APP_LANG: ${{ matrix.language }}
UNAME: ${{ github.actor }}
steps:
- uses: actions/checkout@v4
- run: make change-lang LANG=$ISHOCON_APP_LANG
- run: sed -i 's/ishocon2-app-'"${{ env.ISHOCON_APP_LANG }}"'/'"${{ env.UNAME }}"'\/ishocon2-app-'"${ISHOCON_APP_LANG}"'/s' ./docker-compose.yml
- run: cat ./docker-compose.yml;
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v5.1.0
with:
context: .
file: ./docker/app/base/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ishocon2-app-base:latest
tags: ${{ env.UNAME }}/ishocon2-app-base:latest
- uses: docker/build-push-action@v5.1.0
with:
context: .
file: ./docker/benchmarker/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ishocon2-app-bench:latest
tags: ${{ env.UNAME }}/ishocon2-app-bench:latest
- uses: docker/build-push-action@v5.1.0
with:
context: .
file: ./docker/app/${{ env.ISHOCON_APP_LANG }}/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ishocon2-app-${{ env.ISHOCON_APP_LANG }}:latest
tags: ${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}:latest
sed -i 's/ruby\|python\|go\|php\|nodejs\|crystal/'"$(ISHOCON_APP_LANG)"'/g' ./docker-compose.yml; \
- run: make build
timeout-minutes: 5
- run: make up bench-with-db-init
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
WORKLOAD = 3
UNAME = $(shell whoami)
ifeq ($(UNAME),)
UNAME = $(shell whoami)
endif

ARCH = $(shell uname -m)

UBUNTU_VERSION = 18.04
Expand Down

0 comments on commit 1d2821a

Please sign in to comment.