-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (35 loc) · 1.13 KB
/
change_task_count.yaml
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
name: Change Task Count
on:
workflow_dispatch:
inputs:
environment:
type: choice
description: What environment to change the task count for
options:
- dev
- staging
new_count:
description: 1 to turn on 0 to turn off
required: true
application_name:
type: choice
description: What application to adjust the task count for
options:
- ingestion
- rail-performance-manager
jobs:
set_count:
if: |
( github.event.inputs.new_count == 0 || github.event.inputs.new_count == 1)
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1
- name: Run ECS Update Service Command
run: aws ecs update-service --cluster lamp --service lamp-${{ github.event.inputs.application_name }}-${{ github.event.inputs.environment }} --desired-count ${{ github.event.inputs.new_count }}