Skip to content

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

Services Deploy (all) [env: staging]

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

Workflow file for this run

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 }}
research-service-enabled: ${{ steps.check-services.outputs.research }}
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 "research=${{ vars.ENABLED_SERVICES == '' || contains(vars.ENABLED_SERVICES, 'research-service') }}" >> "$GITHUB_OUTPUT"
job-service:
needs: check-services
runs-on: ubuntu-latest
if: needs.check-services.outputs.job-service-enabled == 'true'
steps:
- run: |
echo "build job service"
user-service:
needs: check-services
runs-on: ubuntu-latest
if: needs.check-services.outputs.user-service-enabled == 'true'
steps:
- run: |
echo "build user service"
research-service:
needs: check-services
runs-on: ubuntu-latest
if: needs.check-services.outputs.research-service-enabled == 'true'
steps:
- run: |
echo "build research service"
#jobs:
# job-service:
# if: ${{ vars.ENABLED_SERVICES == '' || contains(vars.ENABLED_SERVICES, 'job-service') }}
# uses: ./.github/workflows/deploy-service.yml
# with:
# env: ${{ inputs.env }}
# service: job-service
# secrets: inherit
#
#
# user-service:
# if: ${{ vars.ENABLED_SERVICES == '' || contains(vars.ENABLED_SERVICES, 'user-service') }}
# uses: ./.github/workflows/deploy-service.yml
# with:
# env: ${{ inputs.env }}
# service: user-service
# secrets: inherit
#
# research-service:
# if: ${{ vars.ENABLED_SERVICES == '' || contains(env.ENABLED_SERVICES, 'research-service') }}
# uses: ./.github/workflows/deploy-service.yml
# with:
# env: ${{ inputs.env }}
# service: research-service
# secrets: inherit
#
#