Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/deploy_dev_code.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Dev Deploy Code
name: Dev Code
# This deploys code changes to dev without touching infra.

on:
Expand All @@ -10,11 +10,11 @@ permissions:

jobs:
setup:
name: Discover Directories
name: Discover
uses: ./.github/workflows/get_directories.yml

build:
name: Build Artifacts
name: Build
uses: ./.github/workflows/build.yml
needs:
- setup
Expand All @@ -28,7 +28,7 @@ jobs:


get_build:
name: Resolve Build Outputs
name: Resolve
needs: build
uses: ./.github/workflows/build_get.yml
with:
Expand All @@ -38,7 +38,7 @@ jobs:
ecs_version: ${{ needs.build.outputs.ecs_version }}

deploy:
name: Deploy Code
name: Deploy
uses: ./.github/workflows/deploy.yml
needs:
- setup
Expand Down
49 changes: 4 additions & 45 deletions .github/workflows/deploy_dev_infra.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Dev Deploy Infra
name: Dev Infra

on:
workflow_dispatch:
Expand All @@ -9,18 +9,18 @@ permissions:

jobs:
setup:
name: Discover Directories
name: Discover
uses: ./.github/workflows/get_directories.yml

code:
name: Prepare Infra Artifacts
name: Artifacts
uses: ./.github/workflows/infra_releases.yml
with:
environment: dev
infra_version: ${{ github.sha }}

infra:
name: Apply Infrastructure
name: Apply
needs:
- setup
- code
Expand All @@ -32,44 +32,3 @@ jobs:
lambda_matrix: ${{ needs.setup.outputs.lambda_dirs }}
bootstrap_image_uri: ${{ needs.code.outputs.bootstrap_image_uri }}
service_matrix: ${{ needs.setup.outputs.ecs_service_dirs }}

build:
name: Build Artifacts
uses: ./.github/workflows/build.yml
needs:
- code
- setup
with:
environment: dev
lambda_version: ${{ github.sha }}
frontend_version: ${{ github.sha }}
ecs_version: ${{ github.sha }}
lambda_matrix: ${{ needs.setup.outputs.lambda_dirs }}
ecs_matrix: ${{ needs.setup.outputs.container_dirs }}

get_build:
name: Resolve Build Outputs
needs: build
uses: ./.github/workflows/build_get.yml
with:
environment: dev
lambda_version: ${{ github.sha }}
frontend_version: ${{ github.sha }}
ecs_version: ${{ github.sha }}

deploy:
name: Deploy Code
uses: ./.github/workflows/deploy.yml
needs:
- setup
- build
- get_build
- infra
with:
environment: dev
lambda_version: ${{ needs.build.outputs.lambda_version }}
frontend_version: ${{ needs.build.outputs.frontend_version }}
code_bucket: ${{ needs.get_build.outputs.code_bucket }}
lambda_matrix: ${{ needs.setup.outputs.lambda_dirs }}
task_matrix: ${{ needs.get_build.outputs.ecs_task_matrix }}
ecs_image_uris: ${{ needs.get_build.outputs.ecs_image_uris }}
6 changes: 3 additions & 3 deletions .github/workflows/deploy_prod_code.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Prod Deploy Code
name: Prod Code
# This deploys code changes to prod from release artifacts already present in the shared CI bucket and ECR repository.

on:
Expand All @@ -20,7 +20,7 @@ permissions:

jobs:
get_build:
name: Resolve Release Artifacts
name: Resolve
uses: ./.github/workflows/build_get.yml
with:
environment: ci
Expand All @@ -29,7 +29,7 @@ jobs:
ecs_version: ${{ inputs.ecs_version }}

deploy:
name: Deploy Code
name: Deploy
uses: ./.github/workflows/deploy.yml
needs:
- get_build
Expand Down
21 changes: 3 additions & 18 deletions .github/workflows/deploy_prod_infra.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Prod Deploy Infra
name: Prod Infra

on:
workflow_dispatch:
Expand All @@ -9,7 +9,7 @@ permissions:

jobs:
get_build:
name: Resolve Release Artifacts
name: Resolve
uses: ./.github/workflows/build_get.yml
with:
environment: ci
Expand All @@ -18,7 +18,7 @@ jobs:
ecs_version: 0.9.4

infra:
name: Apply Infrastructure
name: Apply
needs:
- get_build
uses: ./.github/workflows/infra.yml
Expand All @@ -29,18 +29,3 @@ jobs:
lambda_matrix: ${{ needs.get_build.outputs.lambda_version_files }}
bootstrap_image_uri: ${{ needs.get_build.outputs.bootstrap_image_uri }}
service_matrix: ${{ needs.get_build.outputs.ecs_service_matrix }}

deploy:
name: Deploy Code
uses: ./.github/workflows/deploy.yml
needs:
- get_build
- infra # this is only to ensure infra runs before deploy no dependencies on infra outputs i.e. infra is managed separately
with:
environment: prod
lambda_version: ${{ needs.get_build.outputs.lambda_version }}
frontend_version: ${{ needs.get_build.outputs.frontend_version }}
code_bucket: ${{ needs.get_build.outputs.code_bucket }}
lambda_matrix: ${{ needs.get_build.outputs.lambda_version_files }}
task_matrix: ${{ needs.get_build.outputs.ecs_task_matrix }}
ecs_image_uris: ${{ needs.get_build.outputs.ecs_image_uris }}
22 changes: 11 additions & 11 deletions .github/workflows/destroy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Kill Environment
name: Destroy

on:
workflow_dispatch:
Expand All @@ -25,11 +25,11 @@ env:

jobs:
setup:
name: Discover Directories
name: Discover
uses: ./.github/workflows/get_directories.yml

lambdas:
name: Destroy Lambda Infra
name: Lambdas
runs-on: ubuntu-latest
needs: setup
strategy:
Expand All @@ -47,7 +47,7 @@ jobs:
tg_action: destroy

frontend:
name: Destroy Frontend Infra
name: Frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
Expand All @@ -62,7 +62,7 @@ jobs:
tg_action: destroy

services:
name: Destroy Service Infra
name: Services
runs-on: ubuntu-latest
needs: setup
strategy:
Expand All @@ -83,7 +83,7 @@ jobs:
tg_action: destroy

tasks:
name: Destroy Task Infra
name: Tasks
runs-on: ubuntu-latest
needs:
- setup
Expand All @@ -107,7 +107,7 @@ jobs:
tg_action: destroy

network:
name: Destroy Network Infra
name: Network
needs:
- frontend
- services
Expand All @@ -124,7 +124,7 @@ jobs:
tg_action: destroy

security:
name: Destroy Security Infra
name: Security
needs:
- network
runs-on: ubuntu-latest
Expand All @@ -139,7 +139,7 @@ jobs:
tg_action: destroy

build-bucket:
name: Destroy Code Bucket
name: Code Bucket
if: inputs.environment != 'prod'
needs:
- lambdas
Expand All @@ -155,7 +155,7 @@ jobs:
tg_action: destroy

ecr:
name: Destroy ECR
name: ECR
if: inputs.environment != 'prod'
needs:
- network
Expand All @@ -171,7 +171,7 @@ jobs:
tg_action: destroy

cluster:
name: Destroy Cluster Infra
name: Cluster
needs:
- network
runs-on: ubuntu-latest
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pull Request
name: PR

on:
pull_request:
Expand All @@ -14,7 +14,7 @@ on:

jobs:
check-pr-title:
name: Validate PR Title
name: PR Title
runs-on: ubuntu-latest
env:
PR_TITLE: ${{ github.event.pull_request.title }}
Expand All @@ -33,7 +33,7 @@ jobs:
exit 1

check:
name: Detect Changes
name: Changes
needs: check-pr-title
permissions:
pull-requests: read
Expand All @@ -47,7 +47,7 @@ jobs:
needs: check
runs-on: ubuntu-latest
if: ${{ needs.check.outputs.github == 'true' }}
name: Run github formatting checks
name: GH Fmt
timeout-minutes: 2
steps:
- uses: actions/checkout@v6
Expand All @@ -60,7 +60,7 @@ jobs:
needs: check
runs-on: ubuntu-latest
if: ${{ needs.check.outputs.terragrunt == 'true' }}
name: Run terragrunt formatting checks
name: TG Fmt
timeout-minutes: 2
steps:
- uses: actions/checkout@v6
Expand All @@ -81,7 +81,7 @@ jobs:
needs: check
runs-on: ubuntu-latest
if: ${{ needs.check.outputs.terraform == 'true' }}
name: Run terraform lint checks
name: TF Lint
timeout-minutes: 2
steps:
- uses: actions/checkout@v6
Expand All @@ -98,7 +98,7 @@ jobs:
check-lambda-naming:
needs: check
runs-on: ubuntu-latest
name: Check lambda directory naming uses underscores
name: Lambda Names
steps:
- uses: actions/checkout@v6
- name: Fail if any lambda directory uses hyphens
Expand All @@ -113,7 +113,7 @@ jobs:
check-ecs-module-pairs:
needs: check
runs-on: ubuntu-latest
name: Check ECS task/service module pairs
name: ECS Pairs
steps:
- uses: actions/checkout@v6

Expand Down Expand Up @@ -160,13 +160,13 @@ jobs:
echo "✅ All ECS task_/service_ pairs are present."

setup:
name: Discover App Directories
name: Discover
if: ${{ needs.check.outputs.lambdas == 'true' || needs.check.outputs.containers == 'true' }}
needs: check
uses: ./.github/workflows/get_directories.yml

build-lambdas:
name: Build Lambda Changes
name: Build Lambdas
if: ${{ needs.check.outputs.lambdas == 'true' }}
needs:
- check
Expand All @@ -187,7 +187,7 @@ jobs:
just_action: lambda-build

build-containers:
name: Build Container Changes
name: Build Containers
if: ${{ needs.check.outputs.containers == 'true' }}
needs:
- check
Expand All @@ -213,7 +213,7 @@ jobs:
needs:
- check
runs-on: ubuntu-latest
name: Build frontend
name: Build Frontend
timeout-minutes: 5
steps:
- uses: actions/checkout@v6
Expand Down
Loading
Loading