Merge branch 'lllyasviel:main' into docker-build #39
Workflow file for this run
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: Docker | |
on: | |
push: | |
branches-ignore: [ "*" ] | |
# Publish semver tags as releases. | |
tags: [ '*' ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
# This is used to complete the identity challenge | |
# with sigstore/fulcio when running outside of PRs. | |
id-token: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Fooocus version check | |
id: vercheck-fooocus | |
run: | | |
sed -e "s/version *= *'\([0-9\.]*\)'/version=\1/p" \ | |
-e d \ | |
fooocus_version.py >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Docker Fooocus meta | |
id: meta-fooocus | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
${{ github.repository_owner }}/fooocus | |
tags: | | |
type=semver,pattern={{version}},value=${{ steps.vercheck-fooocus.outputs.version }} | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push Docker image | |
id: build-and-push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: linux/amd64, linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta-fooocus.outputs.tags }} | |
labels: ${{ steps.meta-fooocus.outputs.labels }} | |
#cache-from: type=gha | |
#cache-to: type=gha,mode=max | |
no-cache: true |