Compare commits

..

2 Commits

Author SHA1 Message Date
daniel156161 06c3aca483 Merge branch 'main' into alpine
Build and Push Docker Container / build-and-push (push) Successful in 1m30s
2026-04-11 23:42:29 +02:00
daniel156161 44937b6493 update build workflow
Build and Push Docker Container / build-and-push (push) Failing after 12m23s
2026-04-11 23:31:44 +02:00
+31 -7
View File
@@ -6,6 +6,7 @@ on:
push:
branches:
- main
- alpine
workflow_dispatch:
jobs:
@@ -14,26 +15,49 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
# --- Logins ---
- name: Login to Gitea Registry
if: ${{ github.ref == 'refs/heads/alpine' }}
uses: docker/login-action@v4
with:
registry: ${{ vars.DOCKER_REGISTRY_URL }}
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.ACTION_ACCESS_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ github.ref == 'refs/heads/main' }}
uses: docker/login-action@v4
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
# On Branch main: Docker Hub :latest
# On Branch alpine: Gitea :alpine
- name: Repo owner to lowercase
run: echo "REPO_OWNER_LC=$(echo '${{ gitea.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Build and push main image to Docker Hub
if: ${{ github.ref == 'refs/heads/main' }}
uses: docker/build-push-action@v7
with:
context: .
push: true
platforms: linux/amd64
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/borgbackup-ssh:latest
- name: Build and push Alpine image to Gitea
if: ${{ github.ref == 'refs/heads/alpine' }}
uses: docker/build-push-action@v7
with:
context: .
push: true
platforms: linux/amd64
tags: |
${{ vars.DOCKER_REGISTRY_URL }}/${{ env.REPO_OWNER_LC }}/borgbackup-ssh:alpine