Skip to content

migration script upload #1

migration script upload

migration script upload #1

Workflow file for this run

name: Build & push docker image and deploy to environment
on:
workflow_call:
inputs:
docker_registry:
description: Docker registry
required: true
type: string
registry_org:
description: Docker registry organisation
required: true
type: string
additional_docker_tag:
description: Additional docker tag that can be used to specify stable tags
required: false
type: string
additional_docker_build_args:
description: Additional docker build arguments
required: false
type: string
push:
description: Push docker image to registry flag
required: true
type: boolean
docker_multiplatform:
description: Docker image build multiplatform or not
required: true
type: boolean
default: true
secrets:
HMPPS_QUAYIO_USER:
required: false
HMPPS_QUAYIO_TOKEN:
required: false
outputs:
app_version:
description: The version of the app as generated by create_app_version
value: ${{ jobs.docker_build.outputs.version }}
permissions:
contents: read
packages: write
jobs:
docker_build:
name: Build docker image
runs-on: ubuntu-latest
outputs:
version: ${{ steps.app_version.outputs.version }}
steps:
- id: app_version
name: Application version creators
uses: ministryofjustice/hmpps-github-actions/.github/actions/build-test-and-deploy/create_app_version@v2 # WORKFLOW_VERSION
# - uses: ministryofjustice/hmpps-github-actions/.github/actions/build-test-and-deploy/build_docker@v2 # WORKFLOW_VERSION
- uses: ministryofjustice/hmpps-github-actions/.github/actions/build-test-and-deploy/build_docker@@HEAT-462-deployment-migration-script # WORKFLOW_VERSION
if: ${{ ( inputs.docker_registry == 'ghcr.io' ) && ( ! inputs.docker_multiplatform )}}
with:
repository_name: ${{ github.event.repository.name }}
docker_registry: ${{ inputs.docker_registry }}
registry_org: ${{ inputs.registry_org }}
additional_docker_tag: ${{ inputs.additional_docker_tag }}
push: ${{ inputs.push }}
app_version: ${{ steps.app_version.outputs.version }}
additional_docker_build_args: ${{ inputs.additional_docker_build_args }}
- uses: ministryofjustice/hmpps-github-actions/.github/actions/build-test-and-deploy/build_docker@HEAT-462-deployment-migration-script # WORKFLOW_VERSION
# - uses: ministryofjustice/hmpps-github-actions/.github/actions/build-test-and-deploy/build_docker@v2 # WORKFLOW_VERSION
if: ${{ ( inputs.docker_registry == 'quay.io' ) && ( ! inputs.docker_multiplatform )}}
with:
repository_name: ${{ github.event.repository.name }}
docker_registry: ${{ inputs.docker_registry }}
registry_org: ${{ inputs.registry_org }}
additional_docker_tag: ${{ inputs.additional_docker_tag }}
push: ${{ inputs.push }}
app_version: ${{ steps.app_version.outputs.version }}
HMPPS_QUAYIO_USER: ${{ secrets.HMPPS_QUAYIO_USER }}
HMPPS_QUAYIO_TOKEN: ${{ secrets.HMPPS_QUAYIO_TOKEN}}
additional_docker_build_args: ${{ inputs.additional_docker_build_args }}
# git_head_ref: ${{ github.head_ref }}
# git_branch_ref: ${{ github.ref_name }}
# - uses: ministryofjustice/hmpps-github-actions/.github/actions/build-test-and-deploy/build_multiplatform_docker@v2 # WORKFLOW_VERSION
- uses: ministryofjustice/hmpps-github-actions/.github/actions/build-test-and-deploy/build_multiplatform_docker@HEAT-462-deployment-migration-script # WORKFLOW_VERSION
if: ${{ ( inputs.docker_registry == 'ghcr.io' ) && ( inputs.docker_multiplatform )}}
with:
repository_name: ${{ github.event.repository.name }}
docker_registry: ${{ inputs.docker_registry }}
registry_org: ${{ inputs.registry_org }}
additional_docker_tag: ${{ inputs.additional_docker_tag }}
push: ${{ inputs.push }}
app_version: ${{ steps.app_version.outputs.version }}
additional_docker_build_args: ${{ inputs.additional_docker_build_args }}
# - uses: ministryofjustice/hmpps-github-actions/.github/actions/build-test-and-deploy/build_multiplatform_docker@v2 # WORKFLOW_VERSION
- uses: ministryofjustice/hmpps-github-actions/.github/actions/build-test-and-deploy/build_multiplatform_docker@HEAT-462-deployment-migration-script # WORKFLOW_VERSION
if: ${{ ( inputs.docker_registry == 'quay.io' ) && ( inputs.docker_multiplatform )}}
with:
repository_name: ${{ github.event.repository.name }}
docker_registry: ${{ inputs.docker_registry }}
registry_org: ${{ inputs.registry_org }}
additional_docker_tag: ${{ inputs.additional_docker_tag }}
push: ${{ inputs.push }}
app_version: ${{ steps.app_version.outputs.version }}
additional_docker_build_args: ${{ inputs.additional_docker_build_args }}
HMPPS_QUAYIO_USER: ${{ secrets.HMPPS_QUAYIO_USER }}
HMPPS_QUAYIO_TOKEN: ${{ secrets.HMPPS_QUAYIO_TOKEN}}