Skip to content

Commit 2e58314

Browse files
committed
ci: change tags of images to date
1 parent 1e36ad2 commit 2e58314

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.github/workflows/benchmark.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
ISHOCON_APP_LANG: ${{ matrix.language }}
2828
UNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
2929
steps:
30+
- name: Set env
31+
run: echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
3032
- uses: actions/checkout@v4
3133
- name: Replace base image in docker-compose.yml with github actor name
3234
run: |
@@ -49,7 +51,7 @@ jobs:
4951
context: .
5052
push: true
5153
file: ./docker/benchmarker/Dockerfile
52-
tags: ${{ env.UNAME }}/ishocon2-bench:${{ github.sha }}
54+
tags: ${{ env.UNAME }}/ishocon2-bench:${{ env.DATE }}
5355
cache-from: type=local,src=/tmp/.buildx-cache
5456
cache-to: type=local,dest=/tmp/.buildx-cache
5557
platforms: linux/amd64,linux/arm64/v8
@@ -59,7 +61,7 @@ jobs:
5961
context: .
6062
push: true
6163
file: ./docker/app/base/Dockerfile
62-
tags: ${{ env.UNAME }}/ishocon2-app-base:${{ github.sha }}
64+
tags: ${{ env.UNAME }}/ishocon2-app-base:${{ env.DATE }}
6365
cache-from: type=local,src=/tmp/.buildx-cache
6466
cache-to: type=local,dest=/tmp/.buildx-cache
6567
platforms: linux/amd64,linux/arm64/v8
@@ -69,7 +71,7 @@ jobs:
6971
context: .
7072
push: true
7173
file: ./docker/app/base/Dockerfile
72-
tags: ${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}:${{ github.sha }}
74+
tags: ${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}:${{ env.DATE }}
7375
cache-from: type=local,src=/tmp/.buildx-cache
7476
cache-to: type=local,dest=/tmp/.buildx-cache
7577
platforms: linux/amd64,linux/arm64/v8

.github/workflows/build_and_push_images.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
env:
1919
UNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
2020
steps:
21+
- run: echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
2122
- uses: actions/checkout@v4
2223
- name: Set up Docker Buildx
2324
uses: docker/setup-buildx-action@v3
@@ -33,7 +34,7 @@ jobs:
3334
context: .
3435
push: true
3536
file: ./docker/benchmarker/Dockerfile
36-
tags: ${{ env.UNAME }}/ishocon2-bench:latest,${{ env.UNAME }}/ishocon2-bench:${{ github.sha }}
37+
tags: ${{ env.UNAME }}/ishocon2-bench:latest,${{ env.UNAME }}/ishocon2-bench:${{ env.DATE }}
3738
cache-from: type=local,src=/tmp/.buildx-cache
3839
cache-to: type=local,dest=/tmp/.buildx-cache
3940
platforms: linux/amd64,linux/arm64/v8
@@ -43,7 +44,7 @@ jobs:
4344
context: .
4445
push: true
4546
file: ./docker/app/base/Dockerfile
46-
tags: ${{ env.UNAME }}/ishocon2-app-base:latest,${{ env.UNAME }}/ishocon2-app-base:${{ github.sha }}
47+
tags: ${{ env.UNAME }}/ishocon2-app-base:latest,${{ env.UNAME }}/ishocon2-app-base:${{ env.DATE }}
4748
cache-from: type=local,src=/tmp/.buildx-cache
4849
cache-to: type=local,dest=/tmp/.buildx-cache
4950
platforms: linux/amd64,linux/arm64/v8
@@ -66,6 +67,7 @@ jobs:
6667
ISHOCON_APP_LANG: ${{ matrix.language }}
6768
UNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
6869
steps:
70+
- run: echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
6971
- uses: actions/checkout@v4
7072
- name: Set up Docker Buildx
7173
uses: docker/setup-buildx-action@v3
@@ -81,7 +83,7 @@ jobs:
8183
context: .
8284
push: true
8385
file: ./docker/app/base/Dockerfile
84-
tags: ${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}:latest,${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}-${{ github.sha }}:latest
86+
tags: ${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}:latest,${{ env.UNAME }}/ishocon2-app-${{ env.ISHOCON_APP_LANG }}:${{ env.DATE }}
8587
cache-from: type=local,src=/tmp/.buildx-cache
8688
cache-to: type=local,dest=/tmp/.buildx-cache
8789
platforms: linux/amd64,linux/arm64/v8

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ __pycache__/
4747

4848
# go
4949
/webapp/go/webapp
50+
51+
.secret

0 commit comments

Comments
 (0)