From 112348d8621f90f5fa3574de4a35a3a2880556b5 Mon Sep 17 00:00:00 2001 From: Sudo-Ivan Date: Sat, 27 Dec 2025 13:05:33 -0600 Subject: [PATCH] Refactor Docker workflow to conditionally push images based on version tags - Updated the push condition for Docker builds to only trigger on version tags. - Removed caching options from Docker build steps for both standard and rootless images. --- .gitea/workflows/docker.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml index 87acc31..6332c7f 100644 --- a/.gitea/workflows/docker.yml +++ b/.gitea/workflows/docker.yml @@ -61,15 +61,13 @@ jobs: context: . file: ./docker/Dockerfile platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} + push: ${{ startsWith(github.ref, 'refs/tags/v') }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | BUILD_DATE=${{ github.event.head_commit.timestamp }} VCS_REF=${{ github.sha }} VERSION=${{ steps.meta.outputs.version }} - cache-from: type=gha - cache-to: type=gha,mode=max - name: Extract metadata (tags, labels) for Docker (rootless) id: meta_rootless @@ -89,12 +87,10 @@ jobs: context: . file: ./docker/Dockerfile.rootless platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} + push: ${{ startsWith(github.ref, 'refs/tags/v') }} tags: ${{ steps.meta_rootless.outputs.tags }} labels: ${{ steps.meta_rootless.outputs.labels }} build-args: | BUILD_DATE=${{ github.event.head_commit.timestamp }} VCS_REF=${{ github.sha }} VERSION=${{ steps.meta_rootless.outputs.version }} - cache-from: type=gha - cache-to: type=gha,mode=max