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:
@@ -45,6 +45,9 @@ jobs:
|
|||||||
|
|
||||||
echo "version_options=latest,${TAGS%,}" >> $GITHUB_OUTPUT
|
echo "version_options=latest,${TAGS%,}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
echo "Tags: $TAGS"
|
||||||
|
echo "Version options: $version_options"
|
||||||
|
|
||||||
deploy_to_staging:
|
deploy_to_staging:
|
||||||
name: Deploy to Staging
|
name: Deploy to Staging
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
@@ -60,8 +63,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
# with:
|
|
||||||
# fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Show selected version
|
- name: Show selected version
|
||||||
run: |
|
run: |
|
||||||
@@ -75,9 +76,6 @@ jobs:
|
|||||||
echo "GIT_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "none")" >> $GITHUB_OUTPUT
|
echo "GIT_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "none")" >> $GITHUB_OUTPUT
|
||||||
echo "REF_NAME=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
|
echo "REF_NAME=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Manual Approval Step
|
|
||||||
run: echo "Ручное подтверждение получено. Запуск деплоя в ${{ inputs.environment }}..."
|
|
||||||
|
|
||||||
- name: Login to Docker Registry
|
- name: Login to Docker Registry
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
||||||
@@ -94,8 +92,8 @@ jobs:
|
|||||||
echo "Skipping pushing image..."
|
echo "Skipping pushing image..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Install Docker Compose
|
# - name: Install Docker Compose
|
||||||
run: sudo apt-get update && sudo apt-get install -y docker-compose-plugin
|
# run: sudo apt-get update && sudo apt-get install -y docker-compose-plugin
|
||||||
|
|
||||||
- name: Deploy to Swarm
|
- name: Deploy to Swarm
|
||||||
run: |
|
run: |
|
||||||
|
@@ -17,7 +17,7 @@ services:
|
|||||||
test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/healthcheck"]
|
test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/healthcheck"]
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
replicas: 3
|
replicas: 1
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
delay: 20s
|
delay: 20s
|
||||||
|
Reference in New Issue
Block a user