Skip to content

Commit 8fd10c4

Browse files
committed
docker-build
1 parent 90aa273 commit 8fd10c4

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/docker-build.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
env:
1010
REGISTRY: ghcr.io
11-
IMAGE_NAME: ${{ github.repository }}
11+
IMAGE_NAME: ${{ github.repository.toLower() }}
1212

1313
jobs:
1414
build-and-push:
@@ -28,9 +28,16 @@ jobs:
2828
username: ${{ github.actor }}
2929
password: ${{ secrets.GITHUB_TOKEN }}
3030

31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v2
33+
3134
- name: Build and push Docker image
3235
uses: docker/build-push-action@v4
3336
with:
3437
context: .
3538
push: true
36-
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
39+
tags: |
40+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
41+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
42+
cache-from: type=gha
43+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)