From 91b2b8005f2259781b4a190c2bd058437032dc48 Mon Sep 17 00:00:00 2001 From: Nathan Curtis Date: Mon, 2 Dec 2024 13:44:20 -0800 Subject: [PATCH] [TM-1519] Enable a pattern to control which services are deployed in which envs. --- .github/workflows/deploy-services.yml | 61 ++++++++++++++++++--------- 1 file changed, 41 insertions(+), 20 deletions(-) diff --git a/.github/workflows/deploy-services.yml b/.github/workflows/deploy-services.yml index 5844f4dc..450cf29c 100644 --- a/.github/workflows/deploy-services.yml +++ b/.github/workflows/deploy-services.yml @@ -19,25 +19,46 @@ permissions: contents: read jobs: - job-service: - uses: ./.github/workflows/deploy-service.yml - with: - env: ${{ inputs.env }} - service: job-service - secrets: inherit - - user-service: - uses: ./.github/workflows/deploy-service.yml - with: - env: ${{ inputs.env }} - service: user-service - secrets: inherit - - research-service: - uses: ./.github/workflows/deploy-service.yml - with: - env: ${{ inputs.env }} - service: research-service - secrets: inherit + test1: + runs-on: ubuntu-latest + environment: ${{ inputs.env }} + if: vars.ENABLED_SERVICES == '' + steps: + - run: | + echo "services empty" + test2: + runs-on: ubuntu-latest + environment: ${{ inputs.env }} + if: vars.ENABLED_SERBICES != '' + steps: + - run: | + echo "services: ${{ vars.ENABLED_SERVICES }}" +#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 +# +#