Added deployment to test env #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy Test Env | |
on: | |
push: | |
branches: | |
- 'pen_test' | |
workflow_dispatch: | |
inputs: | |
additional_docker_tag: | |
description: Additional docker tag that can be used to specify stable or testing tags | |
required: false | |
default: '' | |
type: string | |
push: | |
description: Push docker image to registry flag | |
required: true | |
default: false | |
type: boolean | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
helm_lint: | |
name: helm lint | |
uses: ministryofjustice/hmpps-github-actions/.github/workflows/test_helm_lint.yml@v2 # WORKFLOW VERSION | |
secrets: inherit | |
with: | |
environment: 'test' | |
kotlin_validate: | |
name: Validate the kotlin | |
uses: ministryofjustice/hmpps-github-actions/.github/workflows/kotlin_validate.yml@v2 # WORKFLOW_VERSION | |
secrets: inherit | |
build: | |
name: Build docker image from hmpps-github-actions | |
uses: ministryofjustice/hmpps-github-actions/.github/workflows/docker_build.yml@v2 # WORKFLOW_VERSION | |
needs: | |
- kotlin_validate | |
with: | |
docker_registry: 'ghcr.io' | |
registry_org: 'ministryofjustice' | |
additional_docker_tag: ${{ inputs.additional_docker_tag }} | |
push: ${{ inputs.push || true }} | |
docker_multiplatform: false | |
deploy_test: | |
name: Deploy to the test environment | |
needs: | |
- build | |
- helm_lint | |
uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@v2 # WORKFLOW_VERSION | |
secrets: inherit | |
with: | |
environment: 'test' | |
app_version: '${{ needs.build.outputs.app_version }}' |