Deploy to Docker Hub #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Docker Hub | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Docker image tag (default: latest)' | |
required: false | |
default: 'latest' | |
env: | |
DOCKER_REPO: servicestack/${{ github.event.repository.name }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: servicestack | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3.3.0 | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./comfy/ | |
push: true | |
tags: | | |
${{ env.DOCKER_REPO }}:${{ github.event.inputs.tag }} | |
${{ env.DOCKER_REPO }}:latest | |
cache-from: type=registry,ref=${{ env.DOCKER_REPO }}:buildcache | |
cache-to: type=registry,ref=${{ env.DOCKER_REPO }}:buildcache,mode=max |