fix: 8
This commit is contained in:
@@ -7,12 +7,8 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: git.fpmoz.sum.ba
|
REGISTRY: git.fpmoz.sum.ba
|
||||||
IMAGE: git.fpmoz.sum.ba/${{ github.repository }}
|
IMAGE: git.fpmoz.sum.ba/marijanela218/helloo-cicdd
|
||||||
|
|
||||||
- name: Set lowercase image
|
|
||||||
run: |
|
|
||||||
IMAGE_LC=$(echo "$IMAGE" | tr '[:upper:]' '[:lower:]')
|
|
||||||
echo "IMAGE_LC=$IMAGE_LC" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# ── JOB 1: Build i Push Docker image ──────────────────
|
# ── JOB 1: Build i Push Docker image ──────────────────
|
||||||
@@ -31,9 +27,9 @@ jobs:
|
|||||||
- name: Build i Push image
|
- name: Build i Push image
|
||||||
run: |
|
run: |
|
||||||
TAG=${{ github.sha }}
|
TAG=${{ github.sha }}
|
||||||
docker build -t $IMAGE_LC:$TAG -t $IMAGE:latest .
|
docker build -t $IMAGE:$TAG -t $IMAGE:latest .
|
||||||
docker push $IMAGE_LC:$TAG
|
docker push $IMAGE:$TAG
|
||||||
docker push $IMAGE_LC:latest
|
docker push $IMAGE:latest
|
||||||
echo $TAG > tag.txt
|
echo $TAG > tag.txt
|
||||||
|
|
||||||
- name: Spremi image tag
|
- name: Spremi image tag
|
||||||
@@ -70,7 +66,7 @@ jobs:
|
|||||||
- name: Update image tag u manifestu
|
- name: Update image tag u manifestu
|
||||||
run: |
|
run: |
|
||||||
TAG=$(cat tag.txt)
|
TAG=$(cat tag.txt)
|
||||||
sed -i "s|image:.*|image: $IMAGE_LC:$TAG|" k8s/deployment.yaml
|
sed -i "s|image:.*|image: $IMAGE:$TAG|" k8s/deployment.yaml
|
||||||
|
|
||||||
- name: Deploy na k3s
|
- name: Deploy na k3s
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user