53 это Санкт Петербург
All checks were successful
Deploy Production / Deploy to Staging (push) Has been skipped

This commit is contained in:
Alex Shevchuk
2025-08-19 20:48:07 +03:00
parent d79ff7ea73
commit 29a137499e

View File

@@ -48,10 +48,9 @@ jobs:
needs: git-metadata needs: git-metadata
env: env:
IMAGE_NAME: molvaapp/test_deploy IMAGE_NAME: molvaapp/test_deploy
IMAGE_TAG: ${{ inputs.environment }}-${{ steps.git-metadata.outputs.GIT_TAG != 'none' && steps.git-metadata.outputs.GIT_TAG || steps.git-metadata.outputs.GIT_SHA }}
CONFIG_FILE: .build/config/staging.yaml CONFIG_FILE: .build/config/staging.yaml
run: | run: |
IMAGE_TAG=${{ inputs.environment }}-${{ steps.git-metadata.outputs.GIT_TAG != 'none' && steps.git-metadata.outputs.GIT_TAG || steps.git-metadata.outputs.GIT_SHA }}
docker build \ docker build \
--build-arg BUILD_LDFLAGS="-w -s" \ --build-arg BUILD_LDFLAGS="-w -s" \
--build-arg CONFIG_FILE_PATH=$CONFIG_FILE \ --build-arg CONFIG_FILE_PATH=$CONFIG_FILE \
@@ -81,6 +80,9 @@ jobs:
- name: Deploy to Swarm - name: Deploy to Swarm
env: env:
REGISTRY: hub.docker.com
REPO: ${{ github.repository }}
DOCKER_HOST: tcp://${{ secrets.SWARM_MANAGER_HOST }}:2376 DOCKER_HOST: tcp://${{ secrets.SWARM_MANAGER_HOST }}:2376
DOCKER_TLS_VERIFY: 1 DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: /tmp/swarm-certs DOCKER_CERT_PATH: /tmp/swarm-certs
@@ -88,7 +90,6 @@ jobs:
VERSION: ${{ inputs.version == 'new' && 'latest' || inputs.version }} VERSION: ${{ inputs.version == 'new' && 'latest' || inputs.version }}
APP_COMMIT: ${{ steps.git-metadata.outputs.GIT_TAG != 'none' && steps.git-metadata.outputs.GIT_TAG || steps.git-metadata.outputs.GIT_SHA }} APP_COMMIT: ${{ steps.git-metadata.outputs.GIT_TAG != 'none' && steps.git-metadata.outputs.GIT_TAG || steps.git-metadata.outputs.GIT_SHA }}
APP_BUILD_DATE: ${{ date +"%Y-%m-%d %T %Z" }}
KEYCLOAK_BASE_URL: ${{ secrets.KEYCLOAK_BASE_URL }} KEYCLOAK_BASE_URL: ${{ secrets.KEYCLOAK_BASE_URL }}
KEYCLOAK_REALM: ${{ secrets.KEYCLOAK_REALM }} KEYCLOAK_REALM: ${{ secrets.KEYCLOAK_REALM }}
@@ -113,6 +114,11 @@ jobs:
INTEGRATION_VKUSVILL_API_TOKEN: ${{ secrets.INTEGRATION_VKUSVILL_API_TOKEN }} INTEGRATION_VKUSVILL_API_TOKEN: ${{ secrets.INTEGRATION_VKUSVILL_API_TOKEN }}
run: | run: |
REPO_NAME=$(echo $REPO | cut -d'/' -f2)
export APP_BUILD_DATE=$(wget -q -O - "https://$REGISTRY/v2/namespaces/molvaapp/repositories/$REPO_NAME/tags?page_size=100" | jq -r '.results[] | select(.name == $VERSION) | .tag_last_pushed')
echo "APP_BUILD_DATE=$APP_BUILD_DATE"
envsubst < docker-compose.staging.yaml > docker-compose.runtime.yaml envsubst < docker-compose.staging.yaml > docker-compose.runtime.yaml
echo "Deploying version $VERSION to ${{ inputs.environment }}..." echo "Deploying version $VERSION to ${{ inputs.environment }}..."