Skip to content

Bump docker/setup-buildx-action from 2 to 3 #95

Bump docker/setup-buildx-action from 2 to 3

Bump docker/setup-buildx-action from 2 to 3 #95

Workflow file for this run

name: build_debian
on:
push:
branches:
- master
paths:
- user-entrypoint.sh
- Dockerfile.debian
- .github/workflows/build_debian.yml
- su-exec/**
pull_request:
branches:
- master
paths:
- user-entrypoint.sh
- Dockerfile.debian
- .github/workflows/build_debian.yml
- su-exec/**
repository_dispatch:
types:
- debian_image_update
jobs:
docker:
runs-on: ubuntu-latest
permissions:
packages: write
env:
TITLE: User Debian
strategy:
matrix:
include:
- base-image: debian:12
dockerfile: Dockerfile.debian
platforms: |-
linux/amd64
linux/arm/v7
linux/arm64
linux/386
linux/ppc64le
linux/s390x
tags: |-
ghcr.io/phasecorex/user-debian:12
ghcr.io/phasecorex/user-debian:bookworm
ghcr.io/phasecorex/user-debian:latest
docker.io/phasecorex/user-debian:12
docker.io/phasecorex/user-debian:bookworm
docker.io/phasecorex/user-debian:latest
cache-from: ghcr.io/phasecorex/user-debian:12
- base-image: debian:12-slim
dockerfile: Dockerfile.debian
platforms: |-
linux/amd64
linux/arm/v7
linux/arm64
linux/386
linux/ppc64le
linux/s390x
tags: |-
ghcr.io/phasecorex/user-debian:12-slim
ghcr.io/phasecorex/user-debian:bookworm-slim
docker.io/phasecorex/user-debian:12-slim
docker.io/phasecorex/user-debian:bookworm-slim
cache-from: ghcr.io/phasecorex/user-debian:12-slim
- base-image: debian:11
dockerfile: Dockerfile.debian
platforms: |-
linux/amd64
linux/arm/v7
linux/arm64
linux/386
linux/ppc64le
linux/s390x
tags: |-
ghcr.io/phasecorex/user-debian:11
ghcr.io/phasecorex/user-debian:bullseye
docker.io/phasecorex/user-debian:11
docker.io/phasecorex/user-debian:bullseye
cache-from: ghcr.io/phasecorex/user-debian:11
- base-image: debian:11-slim
dockerfile: Dockerfile.debian
platforms: |-
linux/amd64
linux/arm/v7
linux/arm64
linux/386
linux/ppc64le
linux/s390x
tags: |-
ghcr.io/phasecorex/user-debian:11-slim
ghcr.io/phasecorex/user-debian:bullseye-slim
docker.io/phasecorex/user-debian:11-slim
docker.io/phasecorex/user-debian:bullseye-slim
cache-from: ghcr.io/phasecorex/user-debian:11-slim
- base-image: debian:10
dockerfile: Dockerfile.debian
platforms: |-
linux/amd64
linux/arm/v7
linux/arm64
linux/386
tags: |-
ghcr.io/phasecorex/user-debian:10
ghcr.io/phasecorex/user-debian:buster
docker.io/phasecorex/user-debian:10
docker.io/phasecorex/user-debian:buster
cache-from: ghcr.io/phasecorex/user-debian:10
- base-image: debian:10-slim
dockerfile: Dockerfile.debian
platforms: |-
linux/amd64
linux/arm/v7
linux/arm64
linux/386
tags: |-
ghcr.io/phasecorex/user-debian:10-slim
ghcr.io/phasecorex/user-debian:buster-slim
docker.io/phasecorex/user-debian:10-slim
docker.io/phasecorex/user-debian:buster-slim
cache-from: ghcr.io/phasecorex/user-debian:10-slim
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: phasecorex/user-debian
labels: |
maintainer=${{ github.repository_owner }}
org.opencontainers.image.vendor=${{ github.repository_owner }}
org.opencontainers.image.title=${{ env.TITLE }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push ${{ matrix.base-image }}
uses: docker/build-push-action@v4
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: ${{ matrix.platforms }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ matrix.tags }}
cache-from: ${{ matrix.cache-from }}
build-args: |
BASE_IMG=${{ matrix.base-image }}
labels: ${{ steps.meta.outputs.labels }}