Files
borgBackup-Docker/.gitea/workflows/prod-docker-images.yml
T
daniel156161 de1dbb24bc
Build and Push Docker Container / build-and-push (push) Successful in 9m10s
push image only to dockerhub
2025-10-21 11:39:04 +02:00

40 lines
1.0 KiB
YAML

name: Build and Push Docker Container
on:
schedule:
- cron: "0 11 * * 5"
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# --- Logins ---
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# ---------------- BRANCH BUILD (main) ----------------
# On Branch: Gitea and Docker Hub :latest
- name: Build & push (branch -> only :latest everywhere)
if: ${{ github.ref_type == 'branch' && github.ref == 'refs/heads/main' }}
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/borgbackup-ssh:latest