Skip to content

fix(actions): field name #25

fix(actions): field name

fix(actions): field name #25

name: Build & Publish
on:
push:
branches:
- "master"
jobs:
test:
runs-on: ubuntu-24.04
strategy:
matrix:
version:
- {
distro: alpine,
rel: 3.21,
dnsmasq: 2.90-r3,
tag: "4km3/dnsmasq:2.90-r3",
taglatest: "4km3/dnsmasq:latest",
}
- {
distro: alpine,
rel: edge,
dnsmasq: 2.90-r3,
tag: "4km3/dnsmasq:20240923",
tagedge: "4km3/dnsmasq:edge",
}
steps:
- uses: actions/checkout@v4
- name: Check credentials
id: docker-credentials
run: |
echo "defined=$(test -n "${{ secrets.DOCKERHUB_USERNAME }}" && echo true || echo false)" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: steps.docker-credentials.outputs.defined == 'true'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
if: steps.docker-credentials.outputs.defined == 'true'
id: docker_build
uses: docker/build-push-action@v6
with:
context: .
build-args: ALPINE_VERSION=${{ matrix.version.rel }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
"4km3/dnsmasq:${{ matrix.version.dnsmasq }}-${{ matrix.version.distro }}-${{ matrix.version.rel }}"
${{ matrix.version.tag }}
${{ matrix.version.taglatest }}
${{ matrix.version.tagedge }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}