Skip to content

Commit

Permalink
chore: use registry caching in Docker build workflows
Browse files Browse the repository at this point in the history
- Change the cache type for docker builds from `gha` to `registry`.
- Configure docker images to be stored in the GitHub Container Registry (`ghcr.io`) with the repository owner and `stable-diffusion-webui:cache` as reference.

Signed-off-by: 陳鈞 <[email protected]>
  • Loading branch information
jim60105 committed Mar 17, 2024
1 parent 36525ed commit a31f052
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/docker_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
VERSION=${{ github.ref_name }}
RELEASE=${{ github.run_number }}
platforms: linux/amd64
# cache-from: type=gha
# cache-to: type=gha,mode=max
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/stable-diffusion-webui:cache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/stable-diffusion-webui:cache,mode=max

docker-dev:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -87,8 +87,8 @@ jobs:
VERSION=dev
RELEASE=${{ github.run_number }}
platforms: linux/amd64
# cache-from: type=gha
# cache-to: type=gha,mode=max
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/stable-diffusion-webui:cache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/stable-diffusion-webui:cache,mode=max

docker-forge:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -127,5 +127,5 @@ jobs:
VERSION=forge
RELEASE=${{ github.run_number }}
platforms: linux/amd64
# cache-from: type=gha
# cache-to: type=gha,mode=max
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/stable-diffusion-webui:cache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/stable-diffusion-webui:cache,mode=max

0 comments on commit a31f052

Please sign in to comment.