2929 required : true
3030 type : string
3131
32- workflow_dispatch : # Added for manual triggers
33- inputs :
34- environment_tag :
35- description : Environment of the deployment
36- required : true
37- type : string
38- default : development
39- docker_compose_file :
40- description : The path of the compose.yaml file needed to build docker images
41- required : true
42- type : string
43- function_app_source_code_path :
44- description : The source path of the function app source code for the docker builds
45- required : true
46- type : string
47- project_name :
48- description : The name of the project
49- required : true
50- type : string
51- excluded_containers_csv_list :
52- description : Excluded containers in a comma separated list
53- required : true
54- type : string
55- build_all_containers : # New input for manual "build all"
56- description : Manual build for ALL containers defined in compose files
57- required : false
58- type : boolean
59- default : false
60-
6132jobs :
6233 get-functions :
6334 runs-on : ubuntu-latest
8455 - name : Determine which Docker container(s) to build
8556 id : get-function-names
8657 env :
87- # Conditionally source inputs based on trigger type
88- COMPOSE_FILES_CSV : ${{ (github.event_name == 'workflow_call' && inputs.docker_compose_file) || github.event.inputs.docker_compose_file }}
89- EXCLUDED_CONTAINERS_CSV : ${{ (github.event_name == 'workflow_call' && inputs.excluded_containers_csv_list) || github.event.inputs.excluded_containers_csv_list }}
90- SOURCE_CODE_PATH : ${{ (github.event_name == 'workflow_call' && inputs.function_app_source_code_path) || github.event.inputs.function_app_source_code_path }}
91- # Pass manual flag to script; defaults to 'false' if not a workflow_dispatch or if input not set
92- BUILD_ALL_CONTAINERS : ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.build_all_containers) || 'false' }}
93- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
58+ COMPOSE_FILES_CSV : ${{ inputs.docker_compose_file }}
59+ EXCLUDED_CONTAINERS_CSV : ${{ inputs.excluded_containers_csv_list }}
60+ SOURCE_CODE_PATH : ${{ inputs.function_app_source_code_path }}
9461 run : bash ./templates/scripts/deployments/get-docker-names.sh
9562
9663 build-and-push :
@@ -136,8 +103,7 @@ jobs:
136103 - name : Create Tags
137104 env :
138105 GH_TOKEN : ${{ github.token }}
139- # Conditionally source environment_tag
140- ENVIRONMENT_TAG : ${{ (github.event_name == 'workflow_call' && inputs.environment_tag) || github.event.inputs.environment_tag }}
106+ ENVIRONMENT_TAG : ${{ inputs.environment_tag }}
141107 continue-on-error : false
142108 run : |
143109 echo "The branch is: ${GITHUB_REF}"
@@ -164,9 +130,8 @@ jobs:
164130 working-directory : ${{ steps.get-function-names.outputs.DOCKER_COMPOSE_DIR }}
165131 continue-on-error : false
166132 env :
167- # Conditionally source inputs
168- COMPOSE_FILE : ${{ (github.event_name == 'workflow_call' && inputs.docker_compose_file) || github.event.inputs.docker_compose_file }}
169- PROJECT_NAME : ${{ (github.event_name == 'workflow_call' && inputs.project_name) || github.event.inputs.project_name }}
133+ COMPOSE_FILE : ${{ inputs.docker_compose_file }}
134+ PROJECT_NAME : ${{ inputs.project_name }}
170135 run : |
171136 function=${{ matrix.function }}
172137 echo PROJECT_NAME: ${PROJECT_NAME}
@@ -310,8 +275,7 @@ jobs:
310275 env :
311276 ACR_NAME : ${{ secrets.ACR_NAME }}
312277 SHORT_COMMIT_HASH : ${{ needs.build-and-push.outputs.short_commit_hash }}
313- # Conditionally source environment_tag
314- ENVIRONMENT_TAG : ${{ (github.event_name == 'workflow_call' && inputs.environment_tag) || github.event.inputs.environment_tag }}
278+ ENVIRONMENT_TAG : ${{ inputs.environment_tag }}
315279 run : bash ./templates/scripts/deployments/append-commit-hash.sh
316280
317281 aggregate-json :
0 commit comments