Skip to content

Add files via upload #162

Add files via upload

Add files via upload #162

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Optional: Allow manual trigger
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Build date for image tags
- name: Get current date
id: date
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
# Build and push Docker image
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: |
promptalchemist/comfyui-docker-new:latest
promptalchemist/comfyui-docker-new:${{ steps.date.outputs.date }}
cache-from: type=gha
cache-to: type=gha,mode=max