Fixes to Docker GitHub Actions workflow

This commit is contained in:
AFCMS 2024-05-15 19:56:50 +02:00 committed by GitHub
parent 5625be70fa
commit b23042839b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -9,7 +9,7 @@ on:
push: push:
branches: [ "master" ] branches: [ "master" ]
# Publish semver tags as releases. # Publish semver tags as releases.
tags: [ "*.*.*" ] tags: [ "*" ]
pull_request: pull_request:
# Build docker image on pull requests. (but do not publish) # Build docker image on pull requests. (but do not publish)
paths: paths:
@ -25,6 +25,12 @@ on:
- '.dockerignore' - '.dockerignore'
- '.github/workflows/docker_image.yml' - '.github/workflows/docker_image.yml'
workflow_dispatch: workflow_dispatch:
inputs:
use_cache:
description: "Use build cache"
required: true
type: boolean
default: true
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
@ -82,6 +88,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
no-cache: ${{ (github.event_name == 'workflow_dispatch' && !inputs.use_cache) || startsWith(github.ref, 'refs/tags/') }}
- name: Test Docker Image - name: Test Docker Image
run: | run: |