Deploy SELC - user ms #240
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: Deploy SELC - user ms | |
on: | |
push: | |
branches: | |
- main | |
- releases/* | |
paths: | |
- "apps/user-ms/**" | |
- "infra/container_apps/user-ms/**" | |
- "apps/pom.xml" | |
- "pom.xml" | |
workflow_dispatch: | |
inputs: | |
env: | |
type: choice | |
description: Environment | |
options: | |
- dev | |
- uat | |
- prod | |
jobs: | |
release_dev: | |
uses: pagopa/selfcare-commons/.github/workflows/call_release_docker.yml@main | |
name: '[Dev] User ms Release' | |
if: ${{ (startsWith(github.ref_name, 'releases/') != true && inputs.env == null) || inputs.env == 'dev' }} | |
secrets: inherit | |
with: | |
environment: dev | |
tf_environment: dev | |
dir: 'infra/container_apps/user-ms' | |
dockerfile_path: ./apps/user-ms/Dockerfile | |
docker_image_name: pagopa/selfcare-user-ms | |
path_openapi_docs: ./apps/user-ms/src/main/docs/openapi.json | |
release_uat: | |
uses: pagopa/selfcare-commons/.github/workflows/call_release_docker.yml@main | |
name: '[UAT] User ms Release' | |
if: ${{ (startsWith(github.ref_name, 'releases/') == true && inputs.env == null) || inputs.env == 'uat' }} | |
secrets: inherit | |
with: | |
environment: uat | |
tf_environment: uat | |
dir: 'infra/container_apps/user-ms' | |
dockerfile_path: ./apps/user-ms/Dockerfile | |
docker_image_name: pagopa/selfcare-user-ms | |
path_openapi_docs: ./apps/user-ms/src/main/docs/openapi.json | |
release_prod: | |
uses: pagopa/selfcare-commons/.github/workflows/call_release_docker.yml@main | |
name: '[Prod] User ms Release' | |
if: ${{ inputs.env == 'prod' }} | |
secrets: inherit | |
with: | |
environment: prod | |
tf_environment: prod | |
dir: 'infra/container_apps/user-ms' | |
dockerfile_path: ./apps/user-ms/Dockerfile | |
docker_image_name: pagopa/selfcare-user-ms | |
path_openapi_docs: ./apps/user-ms/src/main/docs/openapi.json | |
promote_release: | |
name: 'Promote prerelase release' | |
runs-on: ubuntu-20.04 | |
needs: [release_prod] | |
steps: | |
- uses: pagopa/selfcare-commons/github-actions-template/promote-release@main | |
with: | |
github_path_token: ${{ secrets.GH_PAT_VARIABLES }} | |
release_version: ${{ vars.CURRENT_UAT_VERSION }} |