Skip to content

Update docker/metadata-action action to v5.6.1 (#340) #582

Update docker/metadata-action action to v5.6.1 (#340)

Update docker/metadata-action action to v5.6.1 (#340) #582

Workflow file for this run

name: Build
on:
push:
branches:
- '*'
tags:
- 'v*.*.*'
pull_request:
branches:
- '*'
release:
types:
- published
workflow_dispatch:
jobs:
build:
name: "Build ${{ matrix.image.name }}"
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
image:
- name: vladgh/gpg
path: gpg
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
- name: vladgh/minidlna
path: minidlna
platforms: linux/amd64,linux/386,linux/arm/v6,linux/arm/v7,linux/arm64/v8
- name: vladgh/s3sync
path: s3sync
platforms: linux/amd64
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Detect changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
build:
- ${{ matrix.image.path }}/!(**.md)
- name: Docker Metadata
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
id: meta
if: steps.filter.outputs.build == 'true' || ( github.event_name == 'release' && github.event.action == 'published' )
with:
images: ${{ matrix.image.name }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
if: steps.filter.outputs.build == 'true' || ( github.event_name == 'release' && github.event.action == 'published' )
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
if: steps.filter.outputs.build == 'true' || ( github.event_name == 'release' && github.event.action == 'published' )
- name: Login to DockerHub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
if: ( steps.filter.outputs.build == 'true' && github.event_name != 'pull_request' ) || ( github.event_name == 'release' && github.event.action == 'published' )
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
if: steps.filter.outputs.build == 'true' || ( github.event_name == 'release' && github.event.action == 'published' )
with:
context: ${{ matrix.image.path }}
platforms: ${{ matrix.image.platforms }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: ${{ github.event_name != 'pull_request' }}