-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (39 loc) · 1.53 KB
/
deploySnapshot.yml
File metadata and controls
46 lines (39 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Deploy Snapshot — Forces a new ECS deployment of the dev service using current ECR images.
#
# Runs automatically after a successful Build Snapshot, or can be triggered manually to
# redeploy the latest snapshot images already in ECR (e.g. after an infrastructure change).
name: Deploy Snapshot
on:
workflow_run:
workflows: [ "Build Snapshot" ]
types: [ completed ]
workflow_dispatch:
inputs:
desiredCount:
description: 'Number of instances'
required: false
default: '3'
type: string
env:
CLUSTER_NAME: toolbox
SERVICE_NAME: toolbox-dev
jobs:
deploy:
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
# No GitHub token scopes needed — this job only uses AWS credentials from secrets.
permissions: {}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Deploy to ECS
run: |
aws ecs update-service \
--cluster ${{ env.CLUSTER_NAME }} \
--service ${{ env.SERVICE_NAME }} \
--desired-count ${{ inputs.desiredCount || '3' }} \
--force-new-deployment