Skip to content

Commit 42e58d7

Browse files
committed
auto build
1 parent c70c3e0 commit 42e58d7

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/docker-build.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Docker Build and Push
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-and-push:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
14+
- name: Set up QEMU
15+
uses: docker/setup-qemu-action@v3
16+
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v3
19+
with:
20+
driver-opts: |
21+
image=moby/buildkit:master
22+
buildkitd-config: |
23+
[worker.oci]
24+
max-parallelism = 4
25+
26+
- name: Login to Docker Hub
27+
uses: docker/login-action@v3
28+
with:
29+
username: ${{ secrets.DOCKERHUB_USERNAME }}
30+
password: ${{ secrets.DOCKERHUB_TOKEN }}
31+
32+
- name: Extract metadata
33+
id: meta
34+
uses: docker/metadata-action@v5
35+
with:
36+
images: |
37+
${{ secrets.DOCKERHUB_USERNAME }}/ttsfm
38+
tags: |
39+
type=ref,event=tag
40+
type=raw,value=latest
41+
labels: |
42+
org.opencontainers.image.source=${{ github.repositoryUrl }}
43+
44+
- name: Build and push
45+
uses: docker/build-push-action@v5
46+
with:
47+
context: .
48+
platforms: linux/amd64,linux/arm64
49+
push: true
50+
tags: ${{ steps.meta.outputs.tags }}
51+
labels: ${{ steps.meta.outputs.labels }}
52+
cache-from: type=gha
53+
cache-to: type=gha,mode=max
54+
55+
- name: Show image info
56+
run: |
57+
echo "Pushed tags: ${{ steps.meta.outputs.tags }}"
58+
echo "Image digest: ${{ steps.build-and-push.outputs.digest }}"

0 commit comments

Comments
 (0)