From 413ce4d496b84ed52efa8148618b94ec4ac68d7b Mon Sep 17 00:00:00 2001 From: Jonas Hagberg Date: Fri, 3 Jan 2025 13:37:26 +0100 Subject: [PATCH] Refactor Docker image build process in create_packages.yml Removed the --label argument from the Docker build commands in the create_packages.yml workflow. This change simplifies the build process by eliminating unnecessary labeling, while maintaining the integrity of the build logic for different branches. The workflow continues to support efficient image building based on branch context, ensuring a streamlined CI/CD pipeline. --- .github/workflows/create_packages.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/create_packages.yml b/.github/workflows/create_packages.yml index b9c1a72f..83d512e9 100644 --- a/.github/workflows/create_packages.yml +++ b/.github/workflows/create_packages.yml @@ -95,25 +95,21 @@ jobs: # Build frontend and main with new version docker compose build --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg COMMIT_SHA="${{ github.sha }}" \ - --label "org.opencontainers.image.revision=${{ github.sha }}" \ herdbook-frontend main elif [[ "${{ github.ref_name }}" == "production" ]]; then echo "Production branch - building fresh images" docker compose build --no-cache --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg COMMIT_SHA="${{ github.sha }}" \ - --label "org.opencontainers.image.revision=${{ github.sha }}" \ herdbook-frontend main else # For other branches, only build changed images and their dependents if [[ "${{ needs.changes.outputs.frontend }}" == "true" ]]; then docker compose build --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg COMMIT_SHA="${{ github.sha }}" \ - --label "org.opencontainers.image.revision=${{ github.sha }}" \ herdbook-frontend main elif [[ "${{ needs.changes.outputs.main }}" == "true" ]]; then docker compose build --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg COMMIT_SHA="${{ github.sha }}" \ - --label "org.opencontainers.image.revision=${{ github.sha }}" \ main fi