Skip to content

Commit 2d3713c

Browse files
committed
build and push the dev image
1 parent a0a9e99 commit 2d3713c

File tree

7 files changed

+207
-71
lines changed

7 files changed

+207
-71
lines changed

.github/workflows/ci-pipeline.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
python-version: [3.9]
1717

1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020
- name: Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v3
21+
uses: actions/setup-python@v4
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424
- name: Dependency installation

.github/workflows/dockerhub-dev.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Docker Hub Dev
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Set up QEMU
17+
uses: docker/setup-qemu-action@v3
18+
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
21+
22+
- name: Login to Docker Hub
23+
uses: docker/login-action@v3
24+
with:
25+
username: ${{ secrets.DOCKER_USER_NAME }}
26+
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
27+
28+
- name: Free disk space
29+
uses: jlumbroso/free-disk-space@main
30+
with:
31+
tool-cache: false
32+
android: true
33+
dotnet: true
34+
haskell: true
35+
large-packages: true
36+
docker-images: true
37+
swap-storage: true
38+
39+
- name: Build and push the dev image
40+
id: docker_build_dev
41+
uses: docker/build-push-action@v4
42+
with:
43+
context: .
44+
file: "./docker/Dockerfile-Dev"
45+
platforms: linux/amd64,linux/arm64
46+
allow: network.host
47+
github-token: ${{ github.token }}
48+
tags: baxtree/subaligner:dev
49+
push: true

.github/workflows/dockerhub-extra.yml

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Docker Hub Release Extra
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Set up QEMU
16+
uses: docker/setup-qemu-action@v3
17+
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v3
20+
21+
- name: Login to Docker Hub
22+
uses: docker/login-action@v3
23+
with:
24+
username: ${{ secrets.DOCKER_USER_NAME }}
25+
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
26+
27+
- name: Extract the tag
28+
id: tag
29+
run: |
30+
echo "SUBALIGNER_TAG=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
31+
32+
- name: Free disk space
33+
uses: jlumbroso/free-disk-space@main
34+
with:
35+
tool-cache: false
36+
android: true
37+
dotnet: true
38+
haskell: true
39+
large-packages: true
40+
docker-images: true
41+
swap-storage: true
42+
43+
- name: Build and push the Ubuntu 20 image
44+
id: docker_build_latest
45+
uses: docker/build-push-action@v4
46+
with:
47+
context: .
48+
file: "./docker/Dockerfile-Ubuntu20"
49+
platforms: linux/amd64,linux/arm64
50+
allow: network.host
51+
github-token: ${{ github.token }}
52+
tags: |
53+
baxtree/subaligner:dev
54+
push: true
55+
56+
- name: Remove the local Ubuntu 20 image
57+
run: |
58+
docker rmi -f baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.u20
59+
60+
- name: Build and push the Fedora 34 image
61+
id: docker_build_fed34
62+
uses: docker/build-push-action@v2
63+
with:
64+
context: ./docker
65+
file: "./docker/Dockerfile-Fedora34"
66+
build-args: |
67+
"RELEASE_VERSION=${{ env.SUBALIGNER_TAG }}"
68+
platforms: linux/amd64,linux/arm64
69+
allow: network.host
70+
github-token: ${{ github.token }}
71+
tags: baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.fed34
72+
push: true
73+
74+
- name: Remove the local Fedora 34 image
75+
run: |
76+
docker rmi -f baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.fed34
77+
78+
- name: Build and push the ArchLinux image
79+
id: docker_build_arch
80+
uses: docker/build-push-action@v2
81+
with:
82+
context: ./docker
83+
file: "./docker/Dockerfile-ArchLinux"
84+
build-args: |
85+
"RELEASE_VERSION=${{ env.SUBALIGNER_TAG }}"
86+
platforms: linux/amd64
87+
allow: network.host
88+
github-token: ${{ github.token }}
89+
tags: baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.arch
90+
push: true
91+
92+
- name: Remove the local ArchLinux image
93+
run: |
94+
docker rmi -f baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.arch

.github/workflows/dockerhub.yml

+7-67
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Docker Hub
1+
name: Docker Hub Release
22

33
on:
44
release:
@@ -10,16 +10,16 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414

1515
- name: Set up QEMU
16-
uses: docker/setup-qemu-action@v2
16+
uses: docker/setup-qemu-action@v3
1717

1818
- name: Set up Docker Buildx
19-
uses: docker/setup-buildx-action@v2
19+
uses: docker/setup-buildx-action@v3
2020

2121
- name: Login to Docker Hub
22-
uses: docker/login-action@v2
22+
uses: docker/login-action@v3
2323
with:
2424
username: ${{ secrets.DOCKER_USER_NAME }}
2525
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
@@ -45,7 +45,7 @@ jobs:
4545
uses: docker/build-push-action@v4
4646
with:
4747
context: ./docker
48-
file: "./docker/Dockerfile-Ubuntu20"
48+
file: "./docker/Dockerfile-Ubuntu22"
4949
build-args: |
5050
"RELEASE_VERSION=${{ env.SUBALIGNER_TAG }}"
5151
platforms: linux/amd64,linux/arm64
@@ -54,65 +54,5 @@ jobs:
5454
tags: |
5555
baxtree/subaligner:latest
5656
baxtree/subaligner:${{ env.SUBALIGNER_TAG }}
57-
baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.u20
57+
baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.u22
5858
push: true
59-
60-
- name: Remove the local latest image
61-
run: |
62-
docker rmi -f baxtree/subaligner:latest
63-
docker rmi -f baxtree/subaligner:${{ env.SUBALIGNER_TAG }}
64-
docker rmi -f baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.u20
65-
66-
- name: Build and push the Ubuntu 22 image
67-
id: docker_build_u22
68-
uses: docker/build-push-action@v4
69-
with:
70-
context: ./docker
71-
file: "./docker/Dockerfile-Ubuntu22"
72-
build-args: |
73-
"RELEASE_VERSION=${{ env.SUBALIGNER_TAG }}"
74-
platforms: linux/amd64,linux/arm64
75-
allow: network.host
76-
github-token: ${{ github.token }}
77-
tags: baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.u22
78-
push: true
79-
80-
- name: Remove the local Ubuntu 22 image
81-
run: |
82-
docker rmi -f baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.u22
83-
84-
- name: Build and push the Fedora 34 image
85-
id: docker_build_fed34
86-
uses: docker/build-push-action@v2
87-
with:
88-
context: ./docker
89-
file: "./docker/Dockerfile-Fedora34"
90-
build-args: |
91-
"RELEASE_VERSION=${{ env.SUBALIGNER_TAG }}"
92-
platforms: linux/amd64,linux/arm64
93-
allow: network.host
94-
github-token: ${{ github.token }}
95-
tags: baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.fed34
96-
push: true
97-
98-
- name: Remove the local Fedora 34 image
99-
run: |
100-
docker rmi -f baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.fed34
101-
102-
- name: Build and push the ArchLinux image
103-
id: docker_build_arch
104-
uses: docker/build-push-action@v2
105-
with:
106-
context: ./docker
107-
file: "./docker/Dockerfile-ArchLinux"
108-
build-args: |
109-
"RELEASE_VERSION=${{ env.SUBALIGNER_TAG }}"
110-
platforms: linux/amd64
111-
allow: network.host
112-
github-token: ${{ github.token }}
113-
tags: baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.arch
114-
push: true
115-
116-
- name: Remove the local ArchLinux image
117-
run: |
118-
docker rmi -f baxtree/subaligner:${{ env.SUBALIGNER_TAG }}.arch

.github/workflows/lint-charts.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: Checkout sources
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020

2121
- name: Setup Helm
2222
uses: mamezou-tech/setup-helmfile@v1.2.0

docker/Dockerfile-Dev

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Subaligner Dev Docker Image
2+
FROM ubuntu:20.04
3+
4+
ENV DEBIAN_FRONTEND=noninteractive
5+
ENV TZ=Europe/London
6+
7+
RUN mkdir -p /subaligner && chmod 755 /subaligner
8+
COPY subaligner /subaligner/subaligner
9+
COPY pyproject.toml /subaligner
10+
11+
WORKDIR /subaligner
12+
13+
RUN ["/bin/bash", "-c", "apt-get -y update &&\
14+
apt-get -y install ffmpeg &&\
15+
apt-get -y install espeak libespeak1 libespeak-dev espeak-data &&\
16+
apt-get -y install libsndfile-dev &&\
17+
apt-get -y install libhdf5-dev &&\
18+
apt-get -y install python3-dev &&\
19+
apt-get -y install python3-tk &&\
20+
apt-get -y install python3-pip &&\
21+
python3 -m pip install --upgrade pip &&\
22+
python3 -m pip install --upgrade \"setuptools<65.0.0\" wheel &&\
23+
python3 -m pip install -e . &&\
24+
python3 -m pip install -e \".[harmony]\""]

tests/integration/feature/subaligner.feature

+30-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,37 @@ Feature: Subaligner CLI
5656
Examples:
5757
| aligner | mode | subtitle-in | subtitle-out |
5858
| subaligner_1pass | <NULL> | "test.srt" | "test_aligned.srt" |
59+
| subaligner_1pass | <NULL> | "test.ttml" | "test_aligned.ttml" |
60+
| subaligner_1pass | <NULL> | "test.xml" | "test_aligned.xml" |
61+
| subaligner_1pass | <NULL> | "test.dfxp" | "test_aligned.dfxp" |
62+
| subaligner_1pass | <NULL> | "test.vtt" | "test_aligned.vtt" |
63+
| subaligner_1pass | <NULL> | "test.ssa" | "test_aligned.ssa" |
64+
| subaligner_1pass | <NULL> | "test.ass" | "test_aligned.ass" |
65+
| subaligner_1pass | <NULL> | "test.sub" | "test_aligned.sub" |
66+
| subaligner_1pass | <NULL> | "test_mpl2.txt" | "test_mpl2_aligned.txt" |
67+
| subaligner_1pass | <NULL> | "test.tmp" | "test_aligned.tmp" |
68+
| subaligner_1pass | <NULL> | "test.smi" | "test_aligned.smi" |
69+
| subaligner_1pass | <NULL> | "test.sami" | "test_aligned.sami" |
70+
| subaligner_1pass | <NULL> | "test.stl" | "test_aligned.srt" |
71+
| subaligner_1pass | <NULL> | "test.scc" | "test_aligned.scc" |
72+
| subaligner_1pass | <NULL> | "test.sbv" | "test_aligned.sbv" |
73+
| subaligner_1pass | <NULL> | "test.ytt" | "test_aligned.ytt" |
5974
| subaligner_2pass | <NULL> | "test.srt" | "test_aligned.srt" |
75+
| subaligner_2pass | <NULL> | "test.ttml" | "test_aligned.ttml" |
76+
| subaligner_1pass | <NULL> | "test.xml" | "test_aligned.xml" |
77+
| subaligner_1pass | <NULL> | "test.dfxp" | "test_aligned.dfxp" |
78+
| subaligner_2pass | <NULL> | "test.vtt" | "test_aligned.vtt" |
79+
| subaligner_2pass | <NULL> | "test.ssa" | "test_aligned.ssa" |
80+
| subaligner_2pass | <NULL> | "test.ass" | "test_aligned.ass" |
81+
| subaligner_2pass | <NULL> | "test.sub" | "test_aligned.sub" |
82+
| subaligner_2pass | <NULL> | "test_mpl2.txt" | "test_mpl2_aligned.txt" |
83+
| subaligner_2pass | <NULL> | "test.tmp" | "test_aligned.tmp" |
84+
| subaligner_2pass | <NULL> | "test.smi" | "test_aligned.smi" |
85+
| subaligner_2pass | <NULL> | "test.sami" | "test_aligned.sami" |
86+
| subaligner_2pass | <NULL> | "test.stl" | "test_aligned.srt" |
87+
| subaligner_2pass | <NULL> | "test.scc" | "test_aligned.scc" |
88+
| subaligner_2pass | <NULL> | "test.sbv" | "test_aligned.sbv" |
89+
| subaligner_2pass | <NULL> | "test.ytt" | "test_aligned.ytt" |
6090

6191
@with-mode @script
6292
Scenario Outline: Test alignments with plain texts as input
@@ -92,7 +122,6 @@ Feature: Subaligner CLI
92122
Examples:
93123
| video-in | subtitle-out |
94124
| "test.mp4" | "test_aligned.json" |
95-
# todo: also add a scenario for transcribe
96125

97126
@remote-inputs
98127
Scenario Outline: Test alignments with remote inputs

0 commit comments

Comments
 (0)