diff --git a/.github/workflows/build-test-and-deploy.yml b/.github/workflows/build-test-and-deploy.yml new file mode 100644 index 0000000..8d228e4 --- /dev/null +++ b/.github/workflows/build-test-and-deploy.yml @@ -0,0 +1,57 @@ +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: true + type: boolean + +permissions: + contents: read + packages: write + +jobs: + + test_docker_build: + name: Build docker image from hmpps-github-actions + uses: ministryofjustice/hmpps-github-actions/.github/workflows/build-test-and-deploy.yml@feat/HEAT-344-share-app-version-across-jobs + secrets: inherit + with: + docker_registry: ${{ inputs.docker_registry || 'quay.io' }} + registry_org: ${{ inputs.registry_org || 'hmpps' }} + additional_docker_tag: ${{ inputs.additional_docker_tag }} + push: ${{ inputs.push || true }} + docker_multiplatform: ${{ inputs.docker_multiplatform }} diff --git a/.github/workflows/test_docker_image_build.yml b/.github/workflows/test_docker_image_build.yml index 9fbd48b..451ec24 100644 --- a/.github/workflows/test_docker_image_build.yml +++ b/.github/workflows/test_docker_image_build.yml @@ -24,7 +24,7 @@ on: - 'ministryofjustice' - 'hmpps' additional_docker_tag: - description: Additional docker tag that can be used to specify stable tags + description: Additional docker tag that can be used to specify stable tags required: false default: '' type: string @@ -42,7 +42,7 @@ jobs: test_docker_build: name: Build docker image from hmpps-github-actions - uses: ministryofjustice/hmpps-github-actions/.github/workflows/test_docker_build.yml@feat/HEAT-354-docker-build + uses: ministryofjustice/hmpps-github-actions/.github/workflows/test_docker_build.yml@feat/HEAT-344-share-app-version-across-jobs secrets: inherit with: docker_registry: ${{ inputs.docker_registry || 'quay.io' }} diff --git a/.github/workflows/test_multiplatform_docker_image_build.yml b/.github/workflows/test_multiplatform_docker_image_build.yml index f2bd675..8a62d89 100644 --- a/.github/workflows/test_multiplatform_docker_image_build.yml +++ b/.github/workflows/test_multiplatform_docker_image_build.yml @@ -24,7 +24,7 @@ on: - 'ministryofjustice' - 'hmpps' additional_docker_tag: - description: Additional docker tag that can be used to specify stable tags + description: Additional docker tag that can be used to specify stable tags required: false default: '' type: string @@ -42,7 +42,7 @@ jobs: test_multiplatform_docker_build: name: Build docker image from hmpps-github-actions - uses: ministryofjustice/hmpps-github-actions/.github/workflows/test_multiplatform_docker_build.yml@feat/HEAT-354-docker-build + uses: ministryofjustice/hmpps-github-actions/.github/workflows/build_multiplatform_docker.yml@feat/HEAT-344-share-app-version-across-jobs secrets: inherit with: docker_registry: ${{ inputs.docker_registry || 'quay.io' }}