1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 09:04:12 +02:00

initial nix based docker images

This commit is contained in:
Robin Appelman 2025-06-07 18:24:39 +02:00
commit 06bf3b4b62
72 changed files with 472 additions and 789 deletions

View file

@ -5,64 +5,37 @@ on:
branches: ["main"]
paths:
- ".forgejo/**"
- "images/**"
- "nix/image/**"
permissions:
contents: read
jobs:
build-images:
runs-on: ubuntu-latest
runs-on: nix
strategy:
matrix:
php-version: ["8.1", "8.2", "8.3", "8.4"]
variant: ["", "-dbg"]
variant: [""]
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
- uses: https://codeberg.org/icewind/attic-action@v1
with:
filters: |
php:
- '.forgejo/**'
- 'images/php/**'
haze:
- '.forgejo/**'
- 'images/php/**'
- 'images/haze/**'
name: link
instance: https://cache.icewind.link
authToken: "${{ secrets.ATTIC_TOKEN }}"
- 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: Build image
run: |
nix build .#'"haze-image-php-${{ matrix.php-version }}"'
- 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 }}
- name: Push image
if: github.ref == 'refs/heads/main'
run: |
skopeo copy --insecure-policy --dest-creds="${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }}" \
"docker-archive:$(nix build .#'"haze-image-php-${{ matrix.php-version }}"' --print-out-paths)" "docker://icewind1991/haze:${{ matrix.php-version }}"