4
Some checks failed
Deploy Production / Deploy to Staging (push) Has been skipped
Go Linter / Build golang services (api_gateway) (push) Has been cancelled
Go Linter / Push Docker Images (api_gateway) (push) Has been cancelled
Go Linter / Run golangci-lint (api_gateway) (push) Has been cancelled

This commit is contained in:
Alex Shevchuk
2025-08-18 17:21:38 +03:00
parent bf0290cbf8
commit ad72aa2a5e
2 changed files with 6 additions and 8 deletions

View File

@@ -45,6 +45,9 @@ jobs:
echo "version_options=latest,${TAGS%,}" >> $GITHUB_OUTPUT
echo "Tags: $TAGS"
echo "Version options: $version_options"
deploy_to_staging:
name: Deploy to Staging
runs-on: ubuntu-22.04
@@ -60,8 +63,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
# with:
# fetch-depth: 0
- name: Show selected version
run: |
@@ -75,9 +76,6 @@ jobs:
echo "GIT_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "none")" >> $GITHUB_OUTPUT
echo "REF_NAME=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
- name: Manual Approval Step
run: echo "Ручное подтверждение получено. Запуск деплоя в ${{ inputs.environment }}..."
- name: Login to Docker Registry
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
@@ -94,8 +92,8 @@ jobs:
echo "Skipping pushing image..."
fi
- name: Install Docker Compose
run: sudo apt-get update && sudo apt-get install -y docker-compose-plugin
# - name: Install Docker Compose
# run: sudo apt-get update && sudo apt-get install -y docker-compose-plugin
- name: Deploy to Swarm
run: |

View File

@@ -17,7 +17,7 @@ services:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/healthcheck"]
deploy:
mode: replicated
replicas: 3
replicas: 1
restart_policy:
condition: on-failure
delay: 20s