Skip to content

Commit

Permalink
fix: update manual deploy workflow for k8s
Browse files Browse the repository at this point in the history
  • Loading branch information
smrz2001 committed Jan 16, 2024
1 parent b323084 commit fd8cd26
Showing 1 changed file with 7 additions and 30 deletions.
37 changes: 7 additions & 30 deletions .github/workflows/deploy-image.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
name: Deploy Release or Commit
name: Deploy to Durable Infra

on:
workflow_dispatch:
inputs:
environment:
type: choice
description: Infrastructure environment to deploy to
description: Durable environment to deploy to
required: true
default: dev
options:
- dev
- qa
- tnet
- prod
type:
type: choice
description: Release or Commit
required: true
default: release
options:
- release
- commit
tag:
type: string
description: Tag to deploy
required: true
default: latest

env:
AWS_REGION: ${{ secrets.AWS_REGION }}
Expand All @@ -37,24 +29,9 @@ jobs:
steps:
-
uses: actions/checkout@v3
-
name: Schedule ECS deployment
run: |
deploy_env="${{ github.event.inputs.environment }}"
deploy_target="release"
deploy_tag="${{ github.event.inputs.tag }}"
if [[ ${{ github.event.inputs.type == 'commit' }} == 'true' ]]; then
# For commit deployments, the target is the same as the tag (i.e. the commit hash).
deploy_target="$deploy_tag"
fi
make DEPLOY_ENV="$deploy_env" DEPLOY_TARGET="$deploy_target" DEPLOY_TAG="$deploy_tag" MANUAL_DEPLOY="true" schedule-ecs-deployment
-
name: Schedule k8s deployment
run: |
deploy_env="${{ github.event.inputs.environment }}"
deploy_tag="${{ github.event.inputs.tag }}"
# If this workflow was run for a release, indicate that this is a release deployment.
if [[ ${{ contains(github.event.head_commit.message, 'chore: Release') }} == 'true' ]]; then
deploy_tag=$(cargo metadata --format-version=1 --no-deps | jq '.packages[0].version' | tr -d '"')
fi
make DEPLOY_ENV="$deploy_env" DEPLOY_TAG="$deploy_tag" schedule-k8s-deployment
env:
DEPLOY_ENV: ${{ github.event.inputs.environment }}
DEPLOY_TAG: ${{ github.event.inputs.tag }
run: make schedule-k8s-deployment

0 comments on commit fd8cd26

Please sign in to comment.