Skip to content

Test deployment to dev environment with review updates #1

Test deployment to dev environment with review updates

Test deployment to dev environment with review updates #1

on:
workflow_call:
inputs:
environment:
required: false
type: string
default: "dev"
core_app:
required: false
type: string
description: "Core app name"
default: "core_app_name"
jobs:
set-env-variable:
runs-on: ubuntu-latest
outputs:
ACCOUNT_NUMBER: ${{ steps.set-env-var.outputs.ACCOUNT_NUMBER }}
APP_NAME: ${{ steps.set-env-var.outputs.APP_NAME }}
CLUSTER_NAME: ${{ steps.set-env-var.outputs.CLUSTER_NAME }}
DOCKER_BUILD_PARAMS: ${{ steps.set-env-var.outputs.DOCKER_BUILD_PARAMS }}
steps:
- name: Checkout Code Repository
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install pipenv
run: pip install pipenv

Check failure on line 32 in .github/workflows/build_and_deploy.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build_and_deploy.yml

Invalid workflow file

You have an error in your yaml syntax on line 32
- name: Build Site
run: |
# python build_branches.py '*${{ inputs.environment }}*'
python build_branches.py '*kmurphy*'
- name: Set Environment Variable
id: set-env-var
run: |
if [ "${{ inputs.environment }}" == "dev" ]; then
echo "ACCOUNT_NUMBER=058264511034" >> $GITHUB_OUTPUT
echo "APP_NAME=${{ inputs.core_app }}-dev" >> $GITHUB_OUTPUT
echo "CLUSTER_NAME=frontend-dev-ecs-cluster" >> $GITHUB_OUTPUT
elif [ "${{ inputs.environment }}" == "staging" ]; then
echo "ACCOUNT_NUMBER=070528468658" >> $GITHUB_OUTPUT
echo "APP_NAME=${{ inputs.core_app }}-staging" >> $GITHUB_OUTPUT
echo "CLUSTER_NAME=frontend-staging-ecs-cluster" >> $GITHUB_OUTPUT
fi
deploy:
uses: 0xPolygon/pipelines/.github/workflows/ecs_deploy_docker_taskdef.yaml@main
needs: set-env-variable
with:
app_name: ${{ needs.set-env-variable.outputs.APP_NAME }}
taskdef_file_vars: .github/assets/${{ inputs.environment }}-taskdef.yaml
aws_region: eu-west-1
environment: ${{ inputs.environment }}
cluster_name: ${{ needs.set-env-variable.outputs.CLUSTER_NAME }}
account_number: "${{ needs.set-env-variable.outputs.ACCOUNT_NUMBER }}"
docker_file: Dockerfile.review
secrets: inherit