Skip to content

Services Deploy (all) [env: staging] #37

Services Deploy (all) [env: staging]

Services Deploy (all) [env: staging] #37

name: Services Deploy (all)
run-name: 'Services Deploy (all) [env: ${{ inputs.env }}]'
on:
workflow_dispatch:
inputs:
env:
description: 'Deployment target environment'
type: choice
required: true
options:
- dev
- test
- staging
- prod
permissions:
id-token: write
contents: read
jobs:
check-services:
runs-on: ubuntu-latest
environment: ${{ inputs.env }}
outputs:
job-service-enabled: ${{ steps.check-services.outputs.job }}
user-service-enabled: ${{ steps.check-services.outputs.user }}
entity-service-enabled: ${{ steps.check-services.outputs.entity }}
research-service-enabled: ${{ steps.check-services.outputs.research }}
unified-database-service-enabled: ${{ steps.check-services.outputs.unified-database }}
steps:
- id: check-services
run: |
echo "job=${{ vars.ENABLED_SERVICES == '' || contains(vars.ENABLED_SERVICES, 'job-service') }}" >> "$GITHUB_OUTPUT"
echo "user=${{ vars.ENABLED_SERVICES == '' || contains(vars.ENABLED_SERVICES, 'user-service') }}" >> "$GITHUB_OUTPUT"
echo "entity=${{ vars.ENABLED_SERVICES == '' || contains(vars.ENABLED_SERVICES, 'entity-service') }}" >> "$GITHUB_OUTPUT"
echo "research=${{ vars.ENABLED_SERVICES == '' || contains(vars.ENABLED_SERVICES, 'research-service') }}" >> "$GITHUB_OUTPUT"
echo "unified-database=${{ vars.ENABLED_SERVICES == '' || contains(vars.ENABLED_SERVICES, 'unified-database-service') }}" >> "$GITHUB_OUTPUT"
job-service:
needs: check-services
if: needs.check-services.outputs.job-service-enabled == 'true'
uses: ./.github/workflows/deploy-service.yml
with:
env: ${{ inputs.env }}
service: job-service
secrets: inherit
user-service:
needs: check-services
if: needs.check-services.outputs.user-service-enabled == 'true'
uses: ./.github/workflows/deploy-service.yml
with:
env: ${{ inputs.env }}
service: user-service
secrets: inherit
entity-service:
needs: check-services
if: needs.check-services.outputs.entity-service-enabled == 'true'
uses: ./.github/workflows/deploy-service.yml
with:
env: ${{ inputs.env }}
service: entity-service
secrets: inherit
research-service:
needs: check-services
if: needs.check-services.outputs.research-service-enabled == 'true'
uses: ./.github/workflows/deploy-service.yml
with:
env: ${{ inputs.env }}
service: research-service
secrets: inherit
unified-database-service:
needs: check-services
if: needs.check-services.outputs.unified-database-service-enabled == 'true'
uses: ./.github/workflows/deploy-service.yml
with:
env: ${{ inputs.env }}
service: unified-database-service
secrets: inherit