ci: use matrix to support multi image build
This commit is contained in:
@@ -1,10 +1,28 @@
|
|||||||
name: Build Debian
|
name: Build Debian
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
debian-trixie:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- name: debian:latest
|
||||||
|
dockerfile: debian/Dockerfile
|
||||||
|
tag: debian:latest
|
||||||
|
- name: debian-trixie
|
||||||
|
dockerfile: debian/Dockerfile
|
||||||
|
tag: debian:trixie
|
||||||
|
- name: debian:bookworm
|
||||||
|
dockerfile: debian/bookworm.Dockerfile
|
||||||
|
tag: debian:bookworm
|
||||||
|
|
||||||
|
name: Build ${{ matrix.name }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
@@ -19,6 +37,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker build --push \
|
docker build --push \
|
||||||
--platform=linux/amd64,linux/arm64 \
|
--platform=linux/amd64,linux/arm64 \
|
||||||
-f debian/Dockerfile \
|
-f ${{ matrix.dockerfile }} \
|
||||||
-t ${{ vars.DOCKER_USERNAME }}/debian:trixie \
|
-t ${{ vars.DOCKER_USERNAME }}/${{ matrix.tag }} \
|
||||||
.
|
.
|
||||||
Reference in New Issue
Block a user