Skip to content
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@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
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@v2
with:
builder: ${{ steps.buildx.outputs.name }}
context: ./debian/
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