db-backup-s3/.github/workflows/build-and-push-images.yml

33 lines
765 B
YAML

---
name: build and push images
on:
push:
branches: ['main']
jobs:
build-and-push-image:
runs-on: ubuntu-latest
env:
ALPINE_VERSION: 3.18
steps:
- 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:
push: true
tags: reg.dev.krd/db-backup-s3/db-backup-s3:alpine-${{ env.ALPINE_VERSION }}
build-args: |
ALPINE_VERSION=${{ env.ALPINE_VERSION }}