Skip to content

Commit

Permalink
Create docker-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lutinglt authored Nov 22, 2024
1 parent a938c00 commit 4c1f1aa
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: ci

on:
workflow_dispatch:
push:
branches:
- 'main'
tags:
- '*'
pull_request:
branches:
- 'main'

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: lutinglt/superset-zh
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 4c1f1aa

Please sign in to comment.