Update docker/setup-buildx-action action to v2.10.0 #388
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
image: | |
- name: vladgh/gpg | |
path: gpg | |
platforms: linux/amd64 | |
- 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/[email protected] | |
- name: Detect changes | |
uses: dorny/[email protected] | |
id: filter | |
with: | |
filters: | | |
build: | |
- ${{ matrix.image.path }}/!(**.md) | |
- name: Docker Metadata | |
uses: docker/[email protected] | |
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/[email protected] | |
if: steps.filter.outputs.build == 'true' || ( github.event_name == 'release' && github.event.action == 'published' ) | |
- name: Set up Docker BuildX | |
uses: docker/[email protected] | |
if: steps.filter.outputs.build == 'true' || ( github.event_name == 'release' && github.event.action == 'published' ) | |
- name: Login to DockerHub | |
uses: docker/[email protected] | |
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/[email protected] | |
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' }} |