Change Task Count #165
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Change Task Count | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
type: choice | |
description: What environment to change the task count for | |
options: | |
- dev | |
- staging | |
- prod | |
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 | |
- bus-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 | |
# yamllint disable rule:line-length | |
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 }} | |
# yamllint enable |