Skip to content

Commit

Permalink
ci: try docker hub registory
Browse files Browse the repository at this point in the history
  • Loading branch information
mickamy committed Jan 4, 2024
1 parent df38a81 commit a17549c
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,45 @@ jobs:
UNAME: ${{ github.actor }}
steps:
- uses: actions/checkout@v4
- run: make change-lang LANG=$ISHOCON_APP_LANG
- run: |
- name: Replace base image in docker-compose.yml with github actor name
run: |
make change-lang
sed -i 's/ishocon2-app-base/${{ env.UNAME }}\/ishocon2-app-base/g' ./docker-compose.yml
cat ./docker-compose.yml
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Build and push bench image
uses: docker/build-push-action@v5
with:
context: .
push: true
file: ./docker/benchmarker/Dockerfile
tags: ${{ env.UNAME }}/ishocon2-app-bench:latest
cache-from: type=registry,ref=${{ env.UNAME }}/ishocon2-app-bench:latest
cache-to: type=inline
- name: Build and push base image
uses: docker/build-push-action@v5
with:
context: .
push: true
file: ./docker/app/base/Dockerfile
tags: ${{ env.UNAME }}/ishocon2-app-base:latest
cache-from: type=registry,ref=${{ env.UNAME }}/ishocon2-app-base:latest
cache-to: type=inline
- name: Build and push app image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}:latest
file: ./docker/app/${{ env.ISHOCON_APP_LANG }}/Dockerfile
cache-from: type=registry,ref=${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}:latestst
cache-to: type=inline
- run: make build
timeout-minutes: 5
- run: make up bench-with-db-init
Expand Down

0 comments on commit a17549c

Please sign in to comment.