Skip to content

Add task definition with GHA #21

Add task definition with GHA

Add task definition with GHA #21

Workflow file for this run

name: Deploy to ENV
## Right now, this workflow is being used to test the rendering of task definitions. This will be extended to be
## the workflow used that deploys to any arbitrary environment as part of https://github.com/department-of-veterans-affairs/va-enp-api/issues/76#issue-2669422105
on:
push:
branches:
- "75-task-definitions"
workflow_dispatch:
inputs:
environment:
type: choice
description: Environment to deploy
default: dev
options:
- dev
- perf
- staging
- prod
ref:
description: "Branch or Commit"
default: main
required: true
type: string
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Renders task definition and deploys to
uses: ./.github/actions/ecs-task-render-deploy
with:
task-definition-path: "./cd/va-enp-api-task-definition.json"
container-name: "dev-va-enp-api"
image: nginx:latest ## using this for now because we don't have ENP images yet
aws-access-key-id: ${{ secrets.VAEC_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.VAEC_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
role-to-assume: ${{ secrets.VAEC_DEPLOY_ROLE }}
env:
AWS_ARN_REGION: ${{ secrets.AWS_ARN_REGION }}
AWS_ACCOUNT_NUMBER: ${{ secrets.AWS_ACCOUNT_NUMBER }}
AWS_REGION: ${{ secrets.AWS_REGION }}
TASK_DEFINITION_SECRETS_JSON: ${{ secrets.DEV_TASK_DEFINITION_SECRETS_JSON }}
DD_API_KEY: ${{ secrets.DD_API_KEY }}
ENV: "dev"