EveryDream2trainer/.github/workflows/docker-image.yml

32 lines
668 B
YAML

name: Docker Image CI
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: self-hosted
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Build Docker image with Buildx
# https://github.com/docker/build-push-action
- name: Build and push
id: build-and-push
uses: docker/build-push-action@v4
with:
context: ./docker
push: false
file: docker/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: CACHEBUST=$(date +%s)