1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 09:04:12 +02:00
haze/.forgejo/workflows/docker.yaml
2026-03-10 15:05:19 +01:00

41 lines
1.1 KiB
YAML

name: Build haze images
on:
push:
branches: ["main"]
paths:
- ".forgejo/workflows/docker.yaml"
- "nix/image/**"
permissions:
contents: read
jobs:
build-images:
runs-on: nix
strategy:
matrix:
php-version: ["8.0", "8.1", "8.2", "8.3", "8.4", "8.5"]
variant: [""]
name: haze-${{ matrix.php-version }}${{ matrix.variant }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: https://codeberg.org/icewind/attic-action@v1
with:
name: link
instance: https://cache.icewind.link
authToken: "${{ secrets.ATTIC_TOKEN }}"
- name: Build image
run: |
nix build .#'"haze-image-php-${{ matrix.php-version }}"'
- 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 }}"