

feat: add gha workflow for building and pushing docker images
@aa5390b0727f19da8ad1d4f7a8253f38ab4f489f
--- .dockerignore
+++ .dockerignore
... | ... | @@ -10,3 +10,5 @@ |
10 | 10 |
.task |
11 | 11 |
Taskfile.yaml |
12 | 12 |
README.md |
13 |
+.secrets |
|
14 |
+.ruff_cache |
+++ .github/workflows/docker-build-and-push.yaml
... | ... | @@ -0,0 +1,51 @@ |
1 | +name: docker-build-and-push | |
2 | + | |
3 | +on: | |
4 | + push: | |
5 | + branches: | |
6 | + - "master" | |
7 | +# TODO: releases | |
8 | + | |
9 | +jobs: | |
10 | + docker: | |
11 | + runs-on: ubuntu-22.04 | |
12 | + strategy: | |
13 | + matrix: | |
14 | + dockerfile: [Dockerfile.cuda, Dockerfile.cpu] | |
15 | + include: | |
16 | + - dockerfile: Dockerfile.cuda | |
17 | + tag-prefix: cuda | |
18 | + - repository-name: Dockerfile.cpu | |
19 | + tag-prefix: cpu | |
20 | + steps: | |
21 | + - uses: actions/checkout@v4 | |
22 | + - name: Login to Docker Hub | |
23 | + uses: docker/login-action@v3 | |
24 | + with: | |
25 | + username: ${{ secrets.DOCKERHUB_USERNAME }} | |
26 | + password: ${{ secrets.DOCKERHUB_TOKEN }} | |
27 | + - id: meta | |
28 | + uses: docker/metadata-action@v5 | |
29 | + with: | |
30 | + images: | | |
31 | + fedirz/speaches | |
32 | + # https://github.com/docker/metadata-action?tab=readme-ov-file#flavor-input | |
33 | + flavor: | | |
34 | + latest=false | |
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 | |
41 | + uses: docker/build-push-action@v5 | |
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/speaches:buildcache | |
51 | + # cache-to: type=registry,ref=fedirz/speaches:buildcache,mode=max |
--- .gitignore
+++ .gitignore
... | ... | @@ -3,3 +3,5 @@ |
3 | 3 |
tests/data |
4 | 4 |
.direnv |
5 | 5 |
.task |
6 |
+.secrets |
|
7 |
+.ruff_cache |
--- flake.nix
+++ flake.nix
... | ... | @@ -18,6 +18,7 @@ |
18 | 18 |
default = pkgs.mkShell { |
19 | 19 |
nativeBuildInputs = with pkgs; [ |
20 | 20 |
(with python311Packages; huggingface-hub) |
21 |
+ act |
|
21 | 22 |
ffmpeg-full |
22 | 23 |
go-task |
23 | 24 |
lsyncd |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?