mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2025-12-31 19:47:25 +01:00
55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
name: Build Debian Container Image
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- ".github/**"
|
|
- "debian/**"
|
|
push:
|
|
paths:
|
|
- ".github/**"
|
|
- "debian/**"
|
|
|
|
env:
|
|
REGISTRY_IMAGE: invoiceninja/invoiceninja-debian
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ startsWith(matrix.platform, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform:
|
|
- linux/amd64
|
|
- linux/arm64
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Prepare
|
|
run: |
|
|
platform=${{ matrix.platform }}
|
|
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
|
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ${{ env.REGISTRY_IMAGE }}
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build
|
|
id: build
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: debian
|
|
platforms: ${{ matrix.platform }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
tags: ${{ env.REGISTRY_IMAGE }}
|
|
outputs: type=image,push-by-digest=true,name-canonical=true
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|