diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index d8c482e..b8e8407 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -9,6 +9,11 @@ env: REGISTRY: git.fpmoz.sum.ba IMAGE: git.fpmoz.sum.ba/${{ github.repository }} +- name: Set lowercase image + run: | + IMAGE_LC=$(echo "$IMAGE" | tr '[:upper:]' '[:lower:]') + echo "IMAGE_LC=$IMAGE_LC" >> $GITHUB_ENV + jobs: # ── JOB 1: Build i Push Docker image ────────────────── build: @@ -22,15 +27,13 @@ jobs: echo ${{ secrets.REGISTRY_PASS }} | \ docker login $REGISTRY \ -u ${{ secrets.REGISTRY_USER }} --password-stdin - - name: Debug repo - run: echo ${{ github.repository }} - name: Build i Push image run: | TAG=${{ github.sha }} - docker build -t $IMAGE:$TAG -t $IMAGE:latest . - docker push $IMAGE:$TAG - docker push $IMAGE:latest + docker build -t $IMAGE_LC:$TAG -t $IMAGE:latest . + docker push $IMAGE_LC:$TAG + docker push $IMAGE_LC:latest echo $TAG > tag.txt - name: Spremi image tag @@ -67,7 +70,7 @@ jobs: - name: Update image tag u manifestu run: | TAG=$(cat tag.txt) - sed -i "s|image:.*|image: $IMAGE:$TAG|" k8s/deployment.yaml + sed -i "s|image:.*|image: $IMAGE_LC:$TAG|" k8s/deployment.yaml - name: Deploy na k3s run: |