1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 17:14:08 +02:00

don't build docker images when not needed

This commit is contained in:
Robin Appelman 2023-06-15 18:02:52 +02:00
commit d4ac27389e

View file

@ -3,6 +3,8 @@ name: Build haze images
on: on:
push: push:
branches: ['main'] branches: ['main']
paths:
- 'images/**'
permissions: permissions:
contents: read contents: read
@ -22,6 +24,15 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- uses: dorny/paths-filter@4067d885736b84de7c414f582ac45897079b0a78 #v2.11.1
id: changes
with:
filters: |
php:
- 'images/php/**'
haze:
- 'images/haze/**'
- name: Log in to the Container registry - name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with: with:
@ -32,6 +43,7 @@ jobs:
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
- name: Build php image - name: Build php image
if: steps.changes.outputs.php == 'true'
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with: with:
context: "images/php" context: "images/php"
@ -44,6 +56,7 @@ jobs:
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
- name: Build haze image - name: Build haze image
if: steps.changes.outputs.haze == 'true'
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with: with:
context: "images/haze" context: "images/haze"