Remove Renovate configuration files and update Docker image workflow for improved tagging and conditional pushing; streamline multi-architecture builds

This commit is contained in:
martadams89 2025-04-21 03:28:45 +01:00
parent d7d6701e8f
commit 1b387aa991
3 changed files with 16 additions and 86 deletions

View file

@ -10,7 +10,6 @@ on:
branches:
- "stable"
# - "unstable" # Optional: Decide if PRs to nightly should trigger
workflow_dispatch:
jobs:
build:
@ -39,18 +38,32 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ github.repository }} # Dynamically use the repository owner and name
images: alplat/dockflare # Your Docker image name
tags: |
# --- ADDED THIS LINE ---
# Create Docker tag from Git SemVer tags (e.g., v1.3.0 -> 1.3.0)
type=semver,pattern={{version}}
# --- Keep existing rules ---
# Create 'latest' tag for stable branch pushes
type=ref,event=branch,pattern=stable,value=latest
# Create 'unstable' tag for unstable branch pushes
type=ref,event=branch,pattern=unstable,value=unstable
# Create tag based on short commit SHA
type=sha,format=short
- name: Build and Push Docker Image (Multi-Arch)
uses: docker/build-push-action@v5
with:
context: .
# Build for multiple architectures
platforms: linux/amd64,linux/arm64 # Enable multi-architecture builds
push: true # Ensure the image is pushed to the registry
# Push only on direct pushes to stable or unstable branches
push: ${{ github.event_name == 'push' && (github.ref_name == 'stable' || github.ref_name == 'unstable') }}
# Use all tags generated by the metadata action
tags: ${{ steps.meta.outputs.tags }}
# Use labels generated by the metadata action
labels: ${{ steps.meta.outputs.labels }}
# Consider enabling caching once it works
# cache-from: type=gha
# cache-to: type=gha,mode=max