Skip to content

Commit 4c1f1aa

Browse files
authored
Create docker-publish.yml
1 parent a938c00 commit 4c1f1aa

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: ci
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- 'main'
8+
tags:
9+
- '*'
10+
pull_request:
11+
branches:
12+
- 'main'
13+
14+
jobs:
15+
docker:
16+
runs-on: ubuntu-latest
17+
steps:
18+
-
19+
name: Checkout
20+
uses: actions/checkout@v4
21+
-
22+
name: Docker meta
23+
id: meta
24+
uses: docker/metadata-action@v5
25+
with:
26+
images: lutinglt/superset-zh
27+
-
28+
name: Login to DockerHub
29+
if: github.event_name != 'pull_request'
30+
uses: docker/login-action@v3
31+
with:
32+
username: ${{ secrets.DOCKERHUB_USERNAME }}
33+
password: ${{ secrets.DOCKERHUB_TOKEN }}
34+
-
35+
name: Build and push
36+
uses: docker/build-push-action@v5
37+
with:
38+
context: .
39+
push: ${{ github.event_name != 'pull_request' }}
40+
tags: ${{ steps.meta.outputs.tags }}
41+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)