Skip to content

AUTOMATIC1111 (via schedule) #609

AUTOMATIC1111 (via schedule)

AUTOMATIC1111 (via schedule) #609

name: WebUI (AUTOMATIC1111)
run-name: AUTOMATIC1111 (via ${{ github.event_name }})
on:
push:
branches:
- "main"
- "release"
paths:
- "docker-bake.hcl"
- "docker-compose.yml"
- "docker/Dockerfile.base"
- "docker/Dockerfile.auto"
- "docker/entrypoint_auto.sh"
- "docker/*auto*"
- "docker/config.json"
- ".github/workflows/build-push-auto.yml"
- "!**.md"
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
inputs:
force-push:
description: "push to GHCR"
type: boolean
required: true
default: false
pull_request:
paths:
- "docker-bake.hcl"
- "docker-compose.yml"
- "docker/Dockerfile.base"
- "docker/Dockerfile.auto"
- "docker/entrypoint_auto.sh"
- "docker/*auto*"
- "docker/config.json"
- ".github/workflows/build-push-auto.yml"
- "!**.md"
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
env:
IMAGE_REGISTRY: ghcr.io
IMAGE_NAMESPACE: ${{ github.repository }}
IMAGE_PLATFORMS: "linux/amd64"
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
strategy:
fail-fast: false
max-parallel: 1
matrix:
include:
- name: "Edge"
target: "auto-edge"
tags: |
type=raw,value=edge,enable={{is_default_branch}}
type=raw,value=edge-{{date 'YYYYMMDD'}},enable={{is_default_branch}}
type=sha,format=short,prefix=edge-
type=ref,event=branch,prefix=edge-
type=ref,event=tag,prefix=edge-
type=ref,event=pr,prefix=edge-
- name: "Latest"
target: "auto-latest"
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=latest-{{date 'YYYYMMDD'}},enable={{is_default_branch}}
type=sha,format=short,prefix=latest-
type=ref,event=branch,prefix=latest-
type=ref,event=tag,prefix=latest-
type=ref,event=pr,prefix=latest-
steps:
- name: Free disk space
id: free-disk-space
run: |
df -h .
sudo find /usr/share/dotnet -delete
sudo find /usr/local/lib/android -delete
df -h .
- name: Checkout
id: checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
platforms: ${{ env.IMAGE_PLATFORMS }}
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAMESPACE }}
tags: ${{ matrix.tags }}
- name: Build and Push Versioned Tags
id: build-push
uses: docker/bake-action@v3
with:
targets: ${{ matrix.target }}
files: |
./docker-bake.hcl
${{ steps.meta.outputs.bake-file }}
push: ${{ ((github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main') || inputs.force-push }}
set: |
*.cache-from=type=gha
*.cache-to=type=gha,mode=min