Skip to content

Commit c3582ee

Browse files
Updated Main.yml File
1 parent ee3ebfd commit c3582ee

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

.github/workflows/main.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,22 @@ jobs:
9292
echo "sha_tag=$SHA_TAG" >> $GITHUB_OUTPUT
9393
if [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then echo "latest_tag=latest" >> $GITHUB_OUTPUT; fi
9494
95+
- name: Compute lowercase image names
96+
id: image
97+
run: |
98+
REPO_LC=$(echo "${GITHUB_REPOSITORY}" | tr '[:upper:]' '[:lower:]')
99+
echo "backend=${REPO_LC}/backend" >> $GITHUB_OUTPUT
100+
echo "frontend=${REPO_LC}/frontend" >> $GITHUB_OUTPUT
101+
95102
- name: Build backend image
96103
uses: docker/build-push-action@v6
97104
with:
98105
context: ./backend
99106
file: ./backend/Dockerfile
100107
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
101108
tags: |
102-
${{ env.REGISTRY }}/${{ env.IMAGE_BACKEND }}:${{ steps.meta.outputs.sha_tag }}
103-
${{ env.REGISTRY }}/${{ env.IMAGE_BACKEND }}:${{ steps.meta.outputs.latest_tag }}
109+
${{ env.REGISTRY }}/${{ steps.image.outputs.backend }}:${{ steps.meta.outputs.sha_tag }}
110+
${{ env.REGISTRY }}/${{ steps.image.outputs.backend }}:${{ steps.meta.outputs.latest_tag }}
104111
105112
- name: Build frontend image
106113
uses: docker/build-push-action@v6
@@ -109,7 +116,7 @@ jobs:
109116
file: ./frontend/Dockerfile
110117
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
111118
tags: |
112-
${{ env.REGISTRY }}/${{ env.IMAGE_FRONTEND }}:${{ steps.meta.outputs.sha_tag }}
113-
${{ env.REGISTRY }}/${{ env.IMAGE_FRONTEND }}:${{ steps.meta.outputs.latest_tag }}
119+
${{ env.REGISTRY }}/${{ steps.image.outputs.frontend }}:${{ steps.meta.outputs.sha_tag }}
120+
${{ env.REGISTRY }}/${{ steps.image.outputs.frontend }}:${{ steps.meta.outputs.latest_tag }}
114121
115122

0 commit comments

Comments
 (0)