ci: enable full cd path
Remove test-tag bypass logic so release tags exercise registry login, image push, and deploy webhook end to end on Gitea Actions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -61,28 +61,16 @@ jobs:
|
||||
REPOSITORY_PATH="${RAW_REPOSITORY#/}"
|
||||
REPOSITORY_PATH="$(printf '%s' "$REPOSITORY_PATH" | tr '[:upper:]' '[:lower:]')"
|
||||
IMAGE_NAME="${REGISTRY_HOST}/${REPOSITORY_PATH}"
|
||||
case "$IMAGE_TAG" in
|
||||
*-test) IS_TEST_TAG=true ;;
|
||||
*) IS_TEST_TAG=false ;;
|
||||
esac
|
||||
{
|
||||
echo "REGISTRY_HOST=${REGISTRY_HOST}"
|
||||
echo "REPOSITORY_PATH=${REPOSITORY_PATH}"
|
||||
echo "IMAGE_NAME=${IMAGE_NAME}"
|
||||
echo "IMAGE_TAG=${IMAGE_TAG}"
|
||||
echo "IMAGE_REF=${IMAGE_NAME}:${IMAGE_TAG}"
|
||||
echo "IS_TEST_TAG=${IS_TEST_TAG}"
|
||||
} >> "$GITHUB_ENV"
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
run: |
|
||||
case "${{ github.ref_name }}" in
|
||||
*-test)
|
||||
echo "Test tag detected; skipping registry login."
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login "$REGISTRY_HOST" \
|
||||
--username "${{ secrets.REGISTRY_USERNAME }}" \
|
||||
--password-stdin
|
||||
@@ -103,24 +91,11 @@ jobs:
|
||||
--build-arg NEXT_PUBLIC_MAPBOX_TOKEN="${{ secrets.NEXT_PUBLIC_MAPBOX_TOKEN }}" \
|
||||
--build-arg NEXT_PUBLIC_TIANDITU_TOKEN="${{ secrets.NEXT_PUBLIC_TIANDITU_TOKEN }}" \
|
||||
.
|
||||
case "${{ github.ref_name }}" in
|
||||
*-test)
|
||||
echo "Test tag detected; build completed without pushing images."
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
docker push "${IMAGE_NAME}:${IMAGE_TAG}"
|
||||
docker push "${IMAGE_NAME}:latest"
|
||||
|
||||
- name: Notify Deploy Server
|
||||
run: |
|
||||
case "${{ github.ref_name }}" in
|
||||
*-test)
|
||||
echo "Test tag detected; skipping deploy webhook."
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
curl -fsSL -X POST "${{ vars.DEPLOY_WEBHOOK_URL }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer ${{ secrets.DEPLOY_WEBHOOK_TOKEN }}" \
|
||||
|
||||
Reference in New Issue
Block a user