From 5b4683d4a796299b028fac37939f9a344e7a739c Mon Sep 17 00:00:00 2001 From: "DESKTOP-RTLN3BA\\$punk" Date: Sat, 13 Dec 2025 15:49:50 -0800 Subject: [PATCH] refactor: Update Docker build workflow to use lowercase image names for multi-arch support --- .github/workflows/docker_build.yaml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker_build.yaml b/.github/workflows/docker_build.yaml index a0099c3b4..954ae9b55 100644 --- a/.github/workflows/docker_build.yaml +++ b/.github/workflows/docker_build.yaml @@ -114,10 +114,16 @@ jobs: contents: read outputs: digest: ${{ steps.build.outputs.digest }} + env: + REGISTRY_IMAGE: ghcr.io/${{ github.repository_owner }}/surfsense steps: - name: Checkout code uses: actions/checkout@v4 + - name: Set lowercase image name + id: image + run: echo "name=${REGISTRY_IMAGE,,}" >> $GITHUB_OUTPUT + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: @@ -143,7 +149,7 @@ jobs: context: . file: ./Dockerfile.allinone push: true - tags: ghcr.io/${{ github.repository_owner }}/surfsense:${{ needs.tag_release.outputs.new_tag }}-amd64 + tags: ${{ steps.image.outputs.name }}:${{ needs.tag_release.outputs.new_tag }}-amd64 platforms: linux/amd64 cache-from: type=gha,scope=amd64 cache-to: type=gha,mode=max,scope=amd64 @@ -158,10 +164,16 @@ jobs: contents: read outputs: digest: ${{ steps.build.outputs.digest }} + env: + REGISTRY_IMAGE: ghcr.io/${{ github.repository_owner }}/surfsense steps: - name: Checkout code uses: actions/checkout@v4 + - name: Set lowercase image name + id: image + run: echo "name=${REGISTRY_IMAGE,,}" >> $GITHUB_OUTPUT + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: @@ -187,7 +199,7 @@ jobs: context: . file: ./Dockerfile.allinone push: true - tags: ghcr.io/${{ github.repository_owner }}/surfsense:${{ needs.tag_release.outputs.new_tag }}-arm64 + tags: ${{ steps.image.outputs.name }}:${{ needs.tag_release.outputs.new_tag }}-arm64 platforms: linux/arm64 cache-from: type=gha,scope=arm64 cache-to: type=gha,mode=max,scope=arm64 @@ -200,7 +212,13 @@ jobs: permissions: packages: write contents: read + env: + REGISTRY_IMAGE: ghcr.io/${{ github.repository_owner }}/surfsense steps: + - name: Set lowercase image name + id: image + run: echo "name=${REGISTRY_IMAGE,,}" >> $GITHUB_OUTPUT + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: @@ -211,7 +229,7 @@ jobs: - name: Create and push multi-arch manifest run: | VERSION_TAG="${{ needs.tag_release.outputs.new_tag }}" - IMAGE="ghcr.io/${{ github.repository_owner }}/surfsense" + IMAGE="${{ steps.image.outputs.name }}" # Create manifest for version tag docker manifest create ${IMAGE}:${VERSION_TAG} \ @@ -235,5 +253,5 @@ jobs: # Note: GHCR doesn't support tag deletion via API easily # The arch-specific tags will remain but users should use the main tags echo "Multi-arch manifest created successfully!" - echo "Users should pull: ghcr.io/${{ github.repository_owner }}/surfsense:${{ needs.tag_release.outputs.new_tag }}" - echo "Or for latest: ghcr.io/${{ github.repository_owner }}/surfsense:latest" + echo "Users should pull: ${{ steps.image.outputs.name }}:${{ needs.tag_release.outputs.new_tag }}" + echo "Or for latest: ${{ steps.image.outputs.name }}:latest"