This repository has been archived on 2026-04-16. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
daniel156161 f291e36c29
Build and Push Docker Container / build-and-push (push) Successful in 7m6s
update actions to new version:
- checkout: v6
- setup-buildx-action: v4
- login-action: v4
- build-push-action: v7
2026-03-10 09:02:39 +01:00

51 lines
1.5 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@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
# --- Logins ---
- name: Login to Gitea Registry
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@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Repo owner to lowercase (for Gitea namespace)
run: echo "REPO_OWNER_LC=$(echo '${{ gitea.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
# ---------------- 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@v7
with:
context: .
push: true
platforms: linux/amd64
tags: |
${{ vars.DOCKER_REGISTRY_URL }}/${{ env.REPO_OWNER_LC }}/mariadb-teleport:latest
${{ secrets.DOCKERHUB_USERNAME }}/mariadb-teleport:latest