Skip to content

Docker Publish Snapshot #88

Docker Publish Snapshot

Docker Publish Snapshot #88

name: Docker Publish Snapshot
on:
workflow_dispatch: ## on button click
schedule:
- cron: '0 1 * * *'
push:
paths:
- Dockerfile
- entrypoint.sh
- '.github/workflows/docker*'
branches:
- main
tags:
- v[0-9]*
env:
CR_REPO: sir5kong/kafka
KAFKA_VERSION: "3.5.0"
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Docker build testing
uses: docker/build-push-action@v4
if: github.ref_name == 'main'
with:
context: .
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
${{ env.CR_REPO }}:snapshot