fix: 7
This commit is contained in:
@@ -9,6 +9,11 @@ env:
|
|||||||
REGISTRY: git.fpmoz.sum.ba
|
REGISTRY: git.fpmoz.sum.ba
|
||||||
IMAGE: git.fpmoz.sum.ba/${{ github.repository }}
|
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:
|
jobs:
|
||||||
# ── JOB 1: Build i Push Docker image ──────────────────
|
# ── JOB 1: Build i Push Docker image ──────────────────
|
||||||
build:
|
build:
|
||||||
@@ -22,15 +27,13 @@ jobs:
|
|||||||
echo ${{ secrets.REGISTRY_PASS }} | \
|
echo ${{ secrets.REGISTRY_PASS }} | \
|
||||||
docker login $REGISTRY \
|
docker login $REGISTRY \
|
||||||
-u ${{ secrets.REGISTRY_USER }} --password-stdin
|
-u ${{ secrets.REGISTRY_USER }} --password-stdin
|
||||||
- name: Debug repo
|
|
||||||
run: echo ${{ github.repository }}
|
|
||||||
|
|
||||||
- name: Build i Push image
|
- name: Build i Push image
|
||||||
run: |
|
run: |
|
||||||
TAG=${{ github.sha }}
|
TAG=${{ github.sha }}
|
||||||
docker build -t $IMAGE:$TAG -t $IMAGE:latest .
|
docker build -t $IMAGE_LC:$TAG -t $IMAGE:latest .
|
||||||
docker push $IMAGE:$TAG
|
docker push $IMAGE_LC:$TAG
|
||||||
docker push $IMAGE:latest
|
docker push $IMAGE_LC:latest
|
||||||
echo $TAG > tag.txt
|
echo $TAG > tag.txt
|
||||||
|
|
||||||
- name: Spremi image tag
|
- name: Spremi image tag
|
||||||
@@ -67,7 +70,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:$TAG|" k8s/deployment.yaml
|
sed -i "s|image:.*|image: $IMAGE_LC:$TAG|" k8s/deployment.yaml
|
||||||
|
|
||||||
- name: Deploy na k3s
|
- name: Deploy na k3s
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user