Skip to content

Merge pull request #20 from smartcommunitylab/renovate/docker-metadat… #8

Merge pull request #20 from smartcommunitylab/renovate/docker-metadat…

Merge pull request #20 from smartcommunitylab/renovate/docker-metadat… #8

name: build push container image
on:
push:
tags:
- '*'
workflow_dispatch:
env:
REGISTRY: ghcr.io
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- healthcheck
- redis
platform:
- linux/amd64
# - linux/arm/v6
# - linux/arm/v7
# - linux/arm64
steps:
- name: Log in to the Container registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}-${{ matrix.version }}
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3
- name: Build and push
id: build
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6
with:
platforms: ${{ matrix.platform }}
file: dockerfiles/php-fpm-${{ matrix.version }}-Dockerfile
push: true
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}