mirror of
https://github.com/chaifeng/ufw-docker.git
synced 2025-07-06 18:46:13 +02:00
Add matrix build for different archs
This commit is contained in:
parent
7886c73f5b
commit
60a1760505
1 changed files with 17 additions and 1 deletions
18
.github/workflows/build.yml
vendored
18
.github/workflows/build.yml
vendored
|
@ -6,6 +6,14 @@ on:
|
|||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [amd64, arm64/v8]
|
||||
variant:
|
||||
- name: nf_tables
|
||||
use_iptables_legacy: "false"
|
||||
- name: legacy
|
||||
use_iptables_legacy: "true"
|
||||
steps:
|
||||
- name: Log into DockerHub
|
||||
if: github.event_name != 'pull_request'
|
||||
|
@ -25,11 +33,19 @@ jobs:
|
|||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ github.actor }}/ufw-docker-agent
|
||||
tags: |
|
||||
type=schedule,suffix=${{ matrix.variant.name }}
|
||||
type=ref,event=branch,suffix=${{ matrix.variant.name }}
|
||||
type=ref,event=pr,suffix=${{ matrix.variant.name }}
|
||||
type=semver,pattern={{version}},suffix=${{ matrix.variant.name }}
|
||||
type=sha,suffix=${{ matrix.variant.name }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
platforms: linux/amd64,linux/arm64/v8
|
||||
platforms: linux/${{ matrix.arch }}
|
||||
build-args: |
|
||||
use_iptables_legacy=${{ matrix.variant.use_iptables_legacy }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue