Skip to content

Commit

Permalink
ci: change tags of images to date
Browse files Browse the repository at this point in the history
  • Loading branch information
mickamy committed Jan 7, 2024
1 parent 1e36ad2 commit 3368db1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
ISHOCON_APP_LANG: ${{ matrix.language }}
UNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
steps:
- name: Set env
run: echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Replace base image in docker-compose.yml with github actor name
run: |
Expand All @@ -49,7 +51,7 @@ jobs:
context: .
push: true
file: ./docker/benchmarker/Dockerfile
tags: ${{ env.UNAME }}/ishocon2-bench:${{ github.sha }}
tags: ${{ env.UNAME }}/ishocon2-bench:${{ env.DATE }}}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
platforms: linux/amd64,linux/arm64/v8
Expand All @@ -59,7 +61,7 @@ jobs:
context: .
push: true
file: ./docker/app/base/Dockerfile
tags: ${{ env.UNAME }}/ishocon2-app-base:${{ github.sha }}
tags: ${{ env.UNAME }}/ishocon2-app-base:${{ env.DATE }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
platforms: linux/amd64,linux/arm64/v8
Expand All @@ -69,7 +71,7 @@ jobs:
context: .
push: true
file: ./docker/app/base/Dockerfile
tags: ${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}:${{ github.sha }}
tags: ${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}:${{ env.DATE }}}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
platforms: linux/amd64,linux/arm64/v8
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/build_and_push_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
env:
UNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
steps:
- run: echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -33,7 +34,7 @@ jobs:
context: .
push: true
file: ./docker/benchmarker/Dockerfile
tags: ${{ env.UNAME }}/ishocon2-bench:latest,${{ env.UNAME }}/ishocon2-bench:${{ github.sha }}
tags: ${{ env.UNAME }}/ishocon2-bench:latest,${{ env.UNAME }}/ishocon2-bench:${{ env.DATE }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
platforms: linux/amd64,linux/arm64/v8
Expand All @@ -43,7 +44,7 @@ jobs:
context: .
push: true
file: ./docker/app/base/Dockerfile
tags: ${{ env.UNAME }}/ishocon2-app-base:latest,${{ env.UNAME }}/ishocon2-app-base:${{ github.sha }}
tags: ${{ env.UNAME }}/ishocon2-app-base:latest,${{ env.UNAME }}/ishocon2-app-base:${{ env.DATE }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
platforms: linux/amd64,linux/arm64/v8
Expand All @@ -66,6 +67,7 @@ jobs:
ISHOCON_APP_LANG: ${{ matrix.language }}
UNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
steps:
- run: echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -81,7 +83,7 @@ jobs:
context: .
push: true
file: ./docker/app/base/Dockerfile
tags: ${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}:latest,${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}-${{ github.sha }}:latest
tags: ${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}:latest,${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}:${{ env.DATE }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
platforms: linux/amd64,linux/arm64/v8
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,5 @@ __pycache__/

# go
/webapp/go/webapp

.secret

0 comments on commit 3368db1

Please sign in to comment.