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
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:
@@ -44,6 +44,9 @@ jobs:
|
||||
"https://$REGISTRY/v2/$REPO/tags/list" | jq -r '.tags[] | select(. != "latest")' | sort -rV | head -10 | tr '\n' ',')
|
||||
|
||||
echo "version_options=latest,${TAGS%,}" >> $GITHUB_OUTPUT
|
||||
|
||||
echo "Tags: $TAGS"
|
||||
echo "Version options: $version_options"
|
||||
|
||||
deploy_to_staging:
|
||||
name: Deploy to Staging
|
||||
@@ -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: |
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user