Skip to content

Commit

Permalink
Merge pull request #214 from communitiesuk/bau/db-migrate-using-paket…
Browse files Browse the repository at this point in the history
…o-image

Run DB migrations using paketo image
  • Loading branch information
samuelhwilliams authored Dec 6, 2024
2 parents 7506485 + 7799c4d commit 2976fb2
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/standard-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,10 @@ on:
environment:
required: true
type: string
version:
description: "DEPRECATED: Used to build `image_location`. Please prefer to provide `image_location` explicitly."
run_db_migrations:
required: false
type: string
db_name:
description: "DEPRECATED: Used to build `image_location`. Please prefer to provide `image_location` explicitly."
required: false
type: string
default: ''
default: false
type: boolean
image_location:
description: "Location of the image to deploy."
type: string
Expand Down Expand Up @@ -71,12 +66,11 @@ jobs:
- name: Inject replacement image into manifest
run: |
export IMAGE_LOCATION="${{ inputs.image_location || format('ghcr.io/communitiesuk/funding-service-design-{0}:{1}', inputs.app_name, inputs.version) }}"
yq -i ".image.location = \"${IMAGE_LOCATION}\"" copilot/fsd-${{ inputs.app_name }}/manifest.yml
yq -i ".image.location = \"${{ inputs.image_location }}\"" copilot/fsd-${{ inputs.app_name }}/manifest.yml
- name: Run database migrations
if: ${{ inputs.db_name != '' }}
run: scripts/migration-task-script.py ${{ inputs.environment }} ${{ inputs.db_name }}
if: ${{ inputs.run_db_migrations }}
run: scripts/migration-task-script.py ${{ inputs.environment }} ${{ inputs.image_location }}

- name: Copilot ${{ inputs.environment }} deploy
id: deploy_build
Expand Down

0 comments on commit 2976fb2

Please sign in to comment.