Skip to content

Change Task Count

Change Task Count #16

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 }}