Skip to content

Commit

Permalink
Merge pull request #173 from mbta/ingestion_task_yaml_patch
Browse files Browse the repository at this point in the history
FIX: Use correct GH Action syntax in .yaml file
  • Loading branch information
mzappitello authored Oct 11, 2023
2 parents 50a8256 + 22093a4 commit 16a2202
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/change_ingestion_task_count.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,25 @@ on:
workflow_dispatch:
inputs:
environment:
description: 'dev or staging'
description: "dev or staging"
required: true
new_count:
description: '1 to turn on 0 to turn off'
description: "1 to turn on 0 to turn off"
required: true


jobs:
run: |
aws ecs update-service --service lamp-ingestion-${{ github.event.inputs.environment }} --desired-count ${{ github.event.inputs.new_count }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
set_count:
if: |
( github.event.inputs.environment == 'staging' || github.event.inputs.environment == 'dev' ) &&
( github.event.inputs.new_count == 0 || github.event.inputs.new_count == 1)
runs-on: ubuntu-latest

steps:
- name: echo command
run: echo "ecs update-service --service lamp-ingestion-${{ github.event.inputs.environment }} --desired-count ${{ github.event.inputs.new_count }}"
- name: run command
run: aws ecs update-service --service lamp-ingestion-${{ github.event.inputs.environment }} --desired-count ${{ github.event.inputs.new_count }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

0 comments on commit 16a2202

Please sign in to comment.