Skip to content

deploy-gf dev

deploy-gf dev #10

Workflow file for this run

name: Deploy contracts GF
run-name: deploy-gf ${{ inputs.environment }}
on:
workflow_call:
inputs:
environment:
required: true
type: string
tag_suffix:
required: true
type: string
workflow_dispatch:
inputs:
environment:
description: AB2D environment
required: true
type: choice
options:
- dev
- test
- sandbox
- prod
image_tag_suffix:
description: Image tag suffix
required: true
type: string
jobs:
apply_tofu:
permissions:
contents: read
id-token: write
uses: cmsgov/ab2d/.github/workflows/terraform-microservices-gf.yml@gf-test--burling/ab2d-6692

Check failure on line 34 in .github/workflows/deploy-gf.yml

View workflow run for this annotation

GitHub Actions / Deploy contracts GF

Invalid workflow file

The workflow is not valid. In .github/workflows/deploy-gf.yml (Line: 34, Col: 11): Error from called workflow cmsgov/ab2d/.github/workflows/terraform-microservices-gf.yml@gf-test--burling/ab2d-6692 (Line: 67, Col: 14): Unrecognized named-value: 'env'. Located at position 19 within expression: inputs.runs_on || env.RUNS_ON_DEFAULT
with:
environment: ${{ inputs.environment }}
contracts_service_image: contract-service-${{ inputs.image_tag_suffix }}
apply: false
runs_on: codebuild-ab2d-contracts-${{github.run_id}}-${{github.run_attempt}}
deploy:
needs: apply_tofu
permissions:
contents: read
id-token: write
runs-on: codebuild-ab2d-contracts-${{github.run_id}}-${{github.run_attempt}}
env:
AWS_ACCOUNT: ${{contains(fromJSON('["dev", "test"]'), inputs.environment) && secrets.GF_NON_PROD_ACCOUNT || secrets.GF_PROD_ACCOUNT}}
AB2D_ENV: ${{ inputs.environment }}
steps:
- uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT }}:role/delegatedadmin/developer/ab2d-${{ env.AB2D_ENV }}-github-actions
- name: Run tofu apply
env:
ECS_FAMILY_PREFIX: ab2d-dev-contracts-service-task-definition
run: |
TASK_DEF=$(aws ecs list-task-definitions --family-prefix $ECS_FAMILY_PREFIX --query "taskDefinitionArns[0]" | tr -d '"')
echo "task definition=$TASK_DEF"
# - name: Deploy ECS service to run on latest image in ECR
# env:
# DEPLOYMENT_ENV: ab2d-${{ env.AB2D_ENV }}-microservice-cluster
# run: |
# echo "Deploying contracts service"
# aws ecs update-service --cluster "$DEPLOYMENT_ENV" --service ab2d-contracts-service --force-new-deployment > /dev/null
# aws ecs wait services-stable --cluster "$DEPLOYMENT_ENV" --services ab2d-contracts-service