Skip to content

Merge pull request #30 from etkecc/renovate/docker-build-push-action-7.x #51

Merge pull request #30 from etkecc/renovate/docker-build-push-action-7.x

Merge pull request #30 from etkecc/renovate/docker-build-push-action-7.x #51

Workflow file for this run

name:
on:
push:
branches: [ "main" ]
env:
# renovate: datasource=pypi depName=borgmatic
borgmatic_version: 2.1.4
# renovate: datasource=pypi depName=borgbackup
borg_version: 1.4.4
permissions:
checks: write
contents: write
packages: write
pull-requests: read
jobs:
build-publish:
name: Build and Publish
runs-on: self-hosted
strategy:
matrix:
version:
- postgres: '12'
alpine: '3.18'
- postgres: '13'
alpine: '3.19'
- postgres: '14'
alpine: '3.20'
- postgres: '15'
alpine: '3.22'
- postgres: '16'
alpine: '3.22'
- postgres: '17'
alpine: '3.22'
- postgres: '18'
alpine: 'edge'
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Login to ghcr.io
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: |
ghcr.io/${{ github.repository }}
registry.etke.cc/${{ github.repository }}
tags: |
type=raw,value=latest,enable=${{ matrix.version.postgres == '' }}
type=raw,value=${{ matrix.version.postgres }}-${{ env.borg_version }}-${{ env.borgmatic_version }},enable=${{ github.ref_name == 'main' }}
- name: Build and push
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
ALPINE_VERSION=${{ matrix.version.alpine }}
POSTGRES_VERSION=${{ matrix.version.postgres }}
BORGMATIC_VERSION=${{ env.borgmatic_version }}
BORG_VERSION=${{ env.borg_version }}
build-publish-latest:
name: Build and Publish (latest)
runs-on: self-hosted
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Login to ghcr.io
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: |
ghcr.io/${{ github.repository }}
registry.etke.cc/${{ github.repository }}
tags: |
type=raw,value=latest,enable=${{ github.ref_name == 'main' }}
- name: Build and push
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
ALPINE_VERSION=edge
POSTGRES_VERSION=
BORGMATIC_VERSION=${{ env.borgmatic_version }}
BORG_VERSION=${{ env.borg_version }}