Fix change build level for test docker build
Build & Push Docker Image / build (push) Successful in 6m11s
Build & Push Docker Image / build (push) Successful in 6m11s
This commit is contained in:
+17
-10
@@ -37,15 +37,6 @@ jobs:
|
|||||||
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
|
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
|
||||||
echo "registry=dock.monsys.ir" >> "$GITHUB_OUTPUT"
|
echo "registry=dock.monsys.ir" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Login to registry
|
|
||||||
id: login
|
|
||||||
env:
|
|
||||||
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
|
|
||||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
|
||||||
run: |
|
|
||||||
USER_NAME="${REGISTRY_USERNAME:-admin}"
|
|
||||||
printf '%s\n' "$REGISTRY_PASSWORD" | docker login "dock.monsys.ir" -u "$USER_NAME" --password-stdin
|
|
||||||
|
|
||||||
- name: Build Docker images
|
- name: Build Docker images
|
||||||
id: build
|
id: build
|
||||||
run: |
|
run: |
|
||||||
@@ -56,8 +47,22 @@ jobs:
|
|||||||
docker build -f Dockerfile.web -t "$reg/montact-web:$tag" -t "$reg/montact-web:latest" .
|
docker build -f Dockerfile.web -t "$reg/montact-web:$tag" -t "$reg/montact-web:latest" .
|
||||||
docker build -f Dockerfile.stt -t "$reg/montact-stt:$tag" -t "$reg/montact-stt:latest" .
|
docker build -f Dockerfile.stt -t "$reg/montact-stt:$tag" -t "$reg/montact-stt:latest" .
|
||||||
|
|
||||||
|
# Registry login is unsolved. These two steps stay off so a tag run
|
||||||
|
# only proves the three images build. Remove `if: false` on both when
|
||||||
|
# dock.monsys.ir accepts the runner.
|
||||||
|
- name: Login to registry
|
||||||
|
id: login
|
||||||
|
if: false
|
||||||
|
env:
|
||||||
|
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
USER_NAME="${REGISTRY_USERNAME:-admin}"
|
||||||
|
printf '%s\n' "$REGISTRY_PASSWORD" | docker login "dock.monsys.ir" -u "$USER_NAME" --password-stdin
|
||||||
|
|
||||||
- name: Push Docker images
|
- name: Push Docker images
|
||||||
id: push
|
id: push
|
||||||
|
if: false
|
||||||
run: |
|
run: |
|
||||||
set -eu
|
set -eu
|
||||||
tag="${{ steps.meta.outputs.tag }}"
|
tag="${{ steps.meta.outputs.tag }}"
|
||||||
@@ -79,8 +84,8 @@ jobs:
|
|||||||
STEP_OUTCOMES: |
|
STEP_OUTCOMES: |
|
||||||
Checkout code=${{ steps.checkout.outcome }}
|
Checkout code=${{ steps.checkout.outcome }}
|
||||||
Resolve image tag=${{ steps.meta.outcome }}
|
Resolve image tag=${{ steps.meta.outcome }}
|
||||||
Login to registry=${{ steps.login.outcome }}
|
|
||||||
Build Docker images=${{ steps.build.outcome }}
|
Build Docker images=${{ steps.build.outcome }}
|
||||||
|
Login to registry=${{ steps.login.outcome }}
|
||||||
Push Docker images=${{ steps.push.outcome }}
|
Push Docker images=${{ steps.push.outcome }}
|
||||||
run: |
|
run: |
|
||||||
if [ -z "$BALE_TOKEN" ] || [ -z "$BALE_CHAT_ID" ]; then
|
if [ -z "$BALE_TOKEN" ] || [ -z "$BALE_CHAT_ID" ]; then
|
||||||
@@ -93,6 +98,8 @@ jobs:
|
|||||||
title="❌ بیلد ناموفق"
|
title="❌ بیلد ناموفق"
|
||||||
elif printf '%s\n' "$STEP_OUTCOMES" | grep -q '^Push Docker images=success$'; then
|
elif printf '%s\n' "$STEP_OUTCOMES" | grep -q '^Push Docker images=success$'; then
|
||||||
title="✅ بیلد موفق"
|
title="✅ بیلد موفق"
|
||||||
|
elif printf '%s\n' "$STEP_OUTCOMES" | grep -q '^Build Docker images=success$'; then
|
||||||
|
title="✅ بیلد موفق؛ پوش رجیستری هنوز خاموش است"
|
||||||
else
|
else
|
||||||
title="⚠️ بیلد کامل نشد"
|
title="⚠️ بیلد کامل نشد"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user