mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
da5de6a240
since free 10GB Limit is already overused multiple times
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
# Building the Image without pushing to confirm it is still buildable
|
|
# confirum functionality would unfortunately need way more resources
|
|
name: build container image
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
- 'development'
|
|
pull_request:
|
|
branches:
|
|
- 'main'
|
|
- 'development'
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: prepare docker-tag
|
|
env:
|
|
repository: ${{ github.repository }}
|
|
run: echo "dockertag=${repository,,}" >> $GITHUB_ENV
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
- name: Cache Docker layers
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: /tmp/.buildx-cache
|
|
key: buildx-${{ hashFiles('docker-build/Dockerfile') }}
|
|
- name: Build container
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: .
|
|
file: docker-build/Dockerfile
|
|
platforms: linux/amd64
|
|
push: false
|
|
tags: ${{ env.dockertag }}:latest
|
|
cache-from: type=local,src=/tmp/.buildx-cache
|
|
cache-to: type=local,dest=/tmp/.buildx-cache
|