Skip to content

Deploy to dev

Deploy to dev #38

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
run-name: "Deploy to ${{ inputs.environment }}"
on:
workflow_dispatch:
inputs:
environment:
type: choice
description: Environment to deploy
default: dev
options:
- dev
- perf
ref:
description: "Branch or Commit"
default: main
required: true
type: string
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- name: Build and Push Artifacts
id: build_and_push
uses: ./.github/actions/build-push-artifacts
with:
ref: ${{ inputs.ref }}
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 }}
- name: Renders task definition for ${{ inputs.environment }}
uses: ./.github/actions/ecs-task-render-deploy
with:
task-definition-path: "./cd/va-enp-api-task-definition.json"
container-name: "${{ inputs.environment }}-va-enp-api"
image: ${{ steps.build_and_push.outputs.image-uri }}
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 }}
environment: ${{ inputs.environment }}
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: ${{ inputs.environment }}