mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-03 17:14:08 +02:00
ci updates
This commit is contained in:
parent
7419a32685
commit
5335478c97
4 changed files with 27 additions and 47 deletions
68
.forgejo/workflows/docker.yaml
Normal file
68
.forgejo/workflows/docker.yaml
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
name: Build haze images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- ".forgejo/**"
|
||||
- "images/**"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-images:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-version: ["8.1", "8.2", "8.3"]
|
||||
variant: ["", "-dbg"]
|
||||
|
||||
name: haze-${{ matrix.php-version }}${{ matrix.variant }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: https://github.com/dorny/paths-filter@v3
|
||||
id: changes
|
||||
with:
|
||||
filters: |
|
||||
php:
|
||||
- '.forgejo/**'
|
||||
- 'images/php/**'
|
||||
haze:
|
||||
- '.forgejo/**'
|
||||
- 'images/php/**'
|
||||
- 'images/haze/**'
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: https://github.com/docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: https://github.com/docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build php image
|
||||
if: steps.changes.outputs.php == 'true'
|
||||
uses: https://github.com/docker/build-push-action@v5
|
||||
with:
|
||||
context: "images/php"
|
||||
push: true
|
||||
tags: icewind1991/haze-php:${{ matrix.php-version }}${{ matrix.variant }}
|
||||
build-args: |
|
||||
PHP_VERSION=${{ matrix.php-version }}
|
||||
BASE_IMAGE=${{ matrix.variant == '-dbg' && 'icewind1991/php-dbg' || 'php' }}
|
||||
|
||||
- name: Build haze image
|
||||
if: steps.changes.outputs.haze == 'true'
|
||||
uses: https://github.com/docker/build-push-action@v5
|
||||
with:
|
||||
context: "images/haze"
|
||||
push: true
|
||||
tags: icewind1991/haze:${{ matrix.php-version }}${{ matrix.variant }}
|
||||
build-args: |
|
||||
PHP_VERSION=${{ matrix.php-version }}${{ matrix.variant }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue