mirror of
https://github.com/ditkrg/db-backup-s3.git
synced 2026-01-22 22:06:45 +00:00
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
---
|
|
name: build and push images
|
|
|
|
on:
|
|
push:
|
|
branches: ['main']
|
|
|
|
jobs:
|
|
build-and-push-image:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- { db: mysql, alpine: 3.18 }
|
|
- { db: postgres, alpine: 3.18 }
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Log in to DockerHub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: reg.dev.krd
|
|
username: ${{ secrets.HARBOR_PUBLIC_USER }}
|
|
password: ${{ secrets.HARBOR_PUBLIC_TOKEN }}
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: db-backup-s3/${{ matrix.db }}-backup:alpine-${{ matrix.alpine }}
|
|
build-args: |
|
|
ALPINE_VERSION=${{ matrix.alpine }}
|
|
DATABASE_SERVER=${{ matrix.db }}
|
|
platforms: |
|
|
linux/amd64
|
|
linux/arm64
|