Fedir Zadniprovskyi commited on
Commit
56b662d
·
1 Parent(s): f043430

ci: enable docker push

Browse files
.github/workflows/docker-build-and-push.yaml CHANGED
@@ -1,10 +1,12 @@
1
  name: docker-build-and-push
2
 
3
  on:
 
4
  push:
5
  branches:
6
  - "master"
7
- # TODO: releases
 
8
 
9
  jobs:
10
  docker:
@@ -35,6 +37,8 @@ jobs:
35
  prefix=${{ matrix.tag-prefix }}
36
  tags: |
37
  type=sha
 
 
38
  - name: Set up Docker Buildx
39
  uses: docker/setup-buildx-action@v3
40
  - name: Build and push
@@ -42,10 +46,10 @@ jobs:
42
  with:
43
  context: .
44
  file: ${{ matrix.dockerfile }}
45
- # push: true
46
- # TODO: multi-platform
47
  # platforms: linux/amd64,linux/arm64
48
  tags: ${{ steps.meta.outputs.tags }}
49
- # TODO: cache
50
  # cache-from: type=registry,ref=fedirz/faster-whisper-server:buildcache
51
  # cache-to: type=registry,ref=fedirz/faster-whisper-server:buildcache,mode=max
 
1
  name: docker-build-and-push
2
 
3
  on:
4
+ workflow_dispatch:
5
  push:
6
  branches:
7
  - "master"
8
+ tags:
9
+ - 'v*'
10
 
11
  jobs:
12
  docker:
 
37
  prefix=${{ matrix.tag-prefix }}
38
  tags: |
39
  type=sha
40
+ type=semver,pattern={{version}}
41
+ type=semver,pattern={{major}}.{{minor}}
42
  - name: Set up Docker Buildx
43
  uses: docker/setup-buildx-action@v3
44
  - name: Build and push
 
46
  with:
47
  context: .
48
  file: ${{ matrix.dockerfile }}
49
+ push: true
50
+ # TODO:
51
  # platforms: linux/amd64,linux/arm64
52
  tags: ${{ steps.meta.outputs.tags }}
53
+ # TODO:
54
  # cache-from: type=registry,ref=fedirz/faster-whisper-server:buildcache
55
  # cache-to: type=registry,ref=fedirz/faster-whisper-server:buildcache,mode=max