Skip to content

Deploy to Docker Hub #10

Deploy to Docker Hub

Deploy to Docker Hub #10

Workflow file for this run

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