Skip to content

Test static dev deployment #1

Test static dev deployment

Test static dev deployment #1

Workflow file for this run

name: Static Deployment
on:
push:
branches:
- master
workflow_dispatch:
inputs:
environment:
required: false
type: choice
description: "Select the environment to deploy to (optional for pushes)"
default: dev
options:
- staging
- prod
core_app:
required: false
type: string
description: "Core app name"
default: "static"
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 }}
steps:

Check failure on line 28 in .github/workflows/re_use_workflow.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/re_use_workflow.yml

Invalid workflow file

You have an error in your yaml syntax on line 28
- name: Set Environment Variable
id: set-env-var
run: |
if [ "${{ inputs.environment }}" == "dev" ]; then
echo "ACCOUNT_NUMBER=${{ secrets.DEV_ACCOUNT_NUMBER }}" >> $GITHUB_OUTPUT
echo "APP_NAME::${{ inputs.core_app }}-dev" >> $GITHUB_OUTPUT
elif [ "${{ inputs.environment }}" == "staging" ]; then
echo "ACCOUNT_NUMBER::${{ secrets.STAGING_ACCOUNT_NUMBER }}" >> $GITHUB_OUTPUT
echo "APP_NAME::${{ inputs.core_app }}-staging" >> $GITHUB_OUTPUT
elif [ "${{ inputs.environment }}" == "prod" ]; then
echo "ACCOUNT_NUMBER::${{ secrets.PROD_ACCOUNT_NUMBER }}" >> $GITHUB_OUTPUT
echo "APP_NAME::${{ inputs.core_app }}" >> $GITHUB_OUTPUT
fi
deploy:
uses: 0xPolygon/pipelines/.github/workflows/ecs_deploy_docker_taskdef.yaml@DEVOPS-2759-repo-public-update
needs: set-env-variable
with:
app_name: ${{ needs.set-env-variable.outputs.APP_NAME }}
taskdef_file_vars: ${{ inputs.taskdef_file_dir }}/${{ inputs.environment }}-taskdef.yaml
account_number: "${{ needs.set-env-variable.outputs.ACCOUNT_NUMBER }}"
aws_region: eu-west-1
environment: ${{ inputs.environment }}
cluster_name: frontend-${{ inputs.environment }}-ecs-cluster
secrets: inherit