Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Pipeline

Pipeline #22

name: Pipeline
on:
push:
branches:
- main
workflow_dispatch:
inputs:
docker_registry:
description: Docker registry
required: true
default: 'ghcr.io'
type: choice
options:
- 'ghcr.io'
- 'quay.io'
registry_org:
description: Docker registry organisation
required: true
default: 'ministryofjustice'
type: choice
options:
- 'ministryofjustice'
- 'hmpps'
additional_docker_tag:
description: Additional docker tag that can be used to specify stable tags
required: false
default: ''
type: string
push:
description: Push docker image to registry flag
required: true
default: true
type: boolean
docker_multiplatform:
description: docker multiplatform build or not
required: true
default: false
type: boolean
channel_id:
description: Slack channel id
required: true
default: 'NO_SLACK'
type: string
permissions:
contents: read
packages: write
jobs:
create_app_version:
name: Create app version
uses: ministryofjustice/hmpps-github-actions/.github/workflows/create_app_version.yml@feat/HEAT-344-create-deploy_env_workflow
docker_build:
name: Build docker image from hmpps-github-actions
needs: [ create_app_version ]
uses: ministryofjustice/hmpps-github-actions/.github/workflows/docker_build.yml@feat/HEAT-344-create-deploy_env_workflow
secrets: inherit
with:
docker_registry: ${{ inputs.docker_registry || 'ghcr.io' }}
registry_org: ${{ inputs.registry_org || 'ministryofjustice' }}
additional_docker_tag: ${{ inputs.additional_docker_tag }}
push: ${{ inputs.push || true }}
docker_multiplatform: ${{ inputs.docker_multiplatform || false }}
app_version: ${{ needs.create_app_version.outputs.version }}
deploy_env:
name: Deploy
needs: [ docker_build ]
uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@feat/HEAT-344-create-deploy_env_workflow
secrets: inherit
with:
environment: 'dev'
app_version: ${{ needs.create_app_version.outputs.version }}