Build and deploy ephemeral PR environments #16
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 PR (Ephemeral) | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
build: | |
name: Build docker image from hmpps-github-actions | |
uses: ./.github/workflows/docker_build.yml | |
with: | |
docker_registry: 'ghcr.io' | |
registry_org: 'ministryofjustice' | |
additional_docker_tag: ${{ inputs.additional_docker_tag }} | |
push: ${{ inputs.push || true }} | |
docker_multiplatform: false | |
deploy_dev: | |
name: Deploy to the development environment | |
needs: | |
- build | |
uses: ./.github/workflows/deploy_env.yml | |
secrets: inherit | |
with: | |
environment: 'dev' | |
app_version: '${{ needs.build.outputs.app_version }}' | |
release_name: '${{ github.event.repository.name }}-pr-${{ github.event.pull_request.number }}' |