From b1446316da6e15def2934f8e5fc7f665cc834c9a Mon Sep 17 00:00:00 2001 From: Rody Davis Date: Sun, 17 May 2026 00:51:48 -0700 Subject: [PATCH] ci: fix Docker image reference format and naming consistency - Enforced lowercase for image owner and name to comply with Docker standards. - Switched to using the package name from package.json as the image name. - Added a unique tag using the commit SHA to improve deployment reliability. --- .github/workflows/deploy.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 116bcd6..6fd1fbe 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -55,12 +55,22 @@ jobs: username: ${{ gitea.actor }} password: ${{ secrets.GIT_TOKEN }} + - name: Get image metadata + id: meta + run: | + NAME=$(node -p "require('./package.json').name.toLowerCase()") + OWNER=$(echo "${{ gitea.actor }}" | tr '[:upper:]' '[:lower:]') + echo "name=${NAME}" >> $GITHUB_OUTPUT + echo "owner=${OWNER}" >> $GITHUB_OUTPUT + - name: Build and push image uses: docker/build-push-action@v5 with: context: . file: Dockerfile push: true - tags: ${{ env.REGISTRY }}/${{ gitea.repository }}:latest + tags: | + ${{ env.REGISTRY }}/${{ steps.meta.outputs.owner }}/${{ steps.meta.outputs.name }}:latest + ${{ env.REGISTRY }}/${{ steps.meta.outputs.owner }}/${{ steps.meta.outputs.name }}:${{ github.sha }} cache-from: type=gha cache-to: type=gha,mode=max