

ci: update how images are tagged, enable multi-arch builds
@7777c93fd2a5643a42fb67244a2307fb2daa8275
--- .github/workflows/docker-build-and-push.yaml
+++ .github/workflows/docker-build-and-push.yaml
... | ... | @@ -8,6 +8,9 @@ |
8 | 8 |
release: |
9 | 9 |
types: [published] |
10 | 10 |
|
11 |
+env: |
|
12 |
+ IMAGE_NAME: fedirz/faster-whisper-server |
|
13 |
+ |
|
11 | 14 |
jobs: |
12 | 15 |
docker: |
13 | 16 |
runs-on: ubuntu-22.04 |
... | ... | @@ -21,23 +24,24 @@ |
21 | 24 |
tag-suffix: -cpu |
22 | 25 |
steps: |
23 | 26 |
- uses: actions/checkout@v4 |
27 |
+ - id: meta |
|
28 |
+ uses: docker/metadata-action@v5 |
|
29 |
+ with: |
|
30 |
+ images: | |
|
31 |
+ ${{ env.IMAGE_NAME }} |
|
32 |
+ # https://github.com/docker/metadata-action?tab=readme-ov-file#flavor-input |
|
33 |
+ flavor: | |
|
34 |
+ suffix=${{ matrix.tag-suffix}},onlatest=true |
|
35 |
+ tags: | |
|
36 |
+ type=semver,pattern={{major}}.{{minor}}.{{patch}} |
|
37 |
+ type=semver,pattern={{major}}.{{minor}} |
|
38 |
+ type=semver,pattern={{major}} |
|
39 |
+ type=sha |
|
24 | 40 |
- name: Login to Docker Hub |
25 | 41 |
uses: docker/login-action@v3 |
26 | 42 |
with: |
27 | 43 |
username: ${{ secrets.DOCKERHUB_USERNAME }} |
28 | 44 |
password: ${{ secrets.DOCKERHUB_TOKEN }} |
29 |
- - id: meta |
|
30 |
- uses: docker/metadata-action@v5 |
|
31 |
- with: |
|
32 |
- images: | |
|
33 |
- fedirz/faster-whisper-server |
|
34 |
- # https://github.com/docker/metadata-action?tab=readme-ov-file#flavor-input |
|
35 |
- flavor: | |
|
36 |
- latest=false |
|
37 |
- suffix=${{ matrix.tag-suffix}} |
|
38 |
- tags: | |
|
39 |
- type=semver,pattern={{version}} |
|
40 |
- type=semver,pattern={{major}}.{{minor}} |
|
41 | 45 |
- name: Set up Docker Buildx |
42 | 46 |
uses: docker/setup-buildx-action@v3 |
43 | 47 |
- name: Build and push |
... | ... | @@ -46,8 +50,7 @@ |
46 | 50 |
context: . |
47 | 51 |
file: ${{ matrix.dockerfile }} |
48 | 52 |
push: true |
49 |
- # TODO: |
|
50 |
- # platforms: linux/amd64,linux/arm64 |
|
53 |
+ platforms: linux/amd64,linux/arm64 |
|
51 | 54 |
tags: ${{ steps.meta.outputs.tags }} |
52 |
- cache-from: type=registry,ref=fedirz/faster-whisper-server:buildcache |
|
53 |
- cache-to: type=registry,ref=fedirz/faster-whisper-server:buildcache,mode=max |
|
55 |
+ cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache |
|
56 |
+ cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max |
--- Taskfile.yaml
+++ Taskfile.yaml
... | ... | @@ -20,6 +20,9 @@ |
20 | 20 |
- Dockerfile.* |
21 | 21 |
- faster_whisper_server/*.py |
22 | 22 |
sync: lsyncd lsyncd.conf |
23 |
+ cii: |
|
24 |
+ cmds: |
|
25 |
+ - act --rm --action-offline-mode --secret-file .secrets {{.CLI_ARGS}} |
|
23 | 26 |
# Python's urllib3 takes forever when ipv6 is enabled |
24 | 27 |
# https://support.nordvpn.com/hc/en-us/articles/20164669224337-How-to-disable-IPv6-on-Linux |
25 | 28 |
disable-ipv6: sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 && sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1 |
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?