mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2025-12-31 19:47:25 +01:00
54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
name: Build Debian Container Image
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "debian/**"
|
|
push:
|
|
paths:
|
|
- "debian/**"
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
with:
|
|
platforms: all
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Cache Docker layers
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: /tmp/.buildx-cache
|
|
key: ${{ runner.os }}-debian-buildx-${{ hashFiles('debian/cache_buster') }}-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-debian-buildx-${{ hashFiles('debian/cache_buster') }}-
|
|
|
|
- name: Build
|
|
id: docker_build
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
builder: ${{ steps.buildx.outputs.name }}
|
|
context: .
|
|
file: Dockerfile
|
|
push: false
|
|
build-args: INVOICENINJA_VERSION=5-develop
|
|
platforms: linux/amd64,linux/arm64
|
|
tags: invoiceninja/invoiceninja-debian:cache
|
|
cache-from: type=local,src=/tmp/.buildx-cache
|
|
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
|
|
|
- name: Move cache
|
|
run: |
|
|
rm -rf /tmp/.buildx-cache
|
|
mv /tmp/.buildx-cache-new /tmp/.buildx-cache |