Repository: Azure/draft
Pull request #194 (2023-03-08 17:15:09)

Move generate-workflow to EmbeddedFS
# Description

Moved the starterWorkflows embedded filesystem to use a portable embedded go package, added variable flag handling to generate-workflow command.

Fixes # (issue)
Feature # (details)

## Type of change

Please delete options that are not relevant.

- [x] New feature (non-breaking change which adds functionality)

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Is it a breaking change which will impact consuming tool(s).

- [x] Unit Test

# Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [X] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [X] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules



msftclas: 
@alexpilotti,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by Microsoft. We will now review your pull request.
_Thanks,
Microsoft Pull Request Bot_
codecov-io: # [Codecov](https://codecov.io/gh/Azure/draft/pull/194?src=pr&el=h1) Report
> Merging [#194](https://codecov.io/gh/Azure/draft/pull/194?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/draft/commit/9b4b1b8b504d88329e0c26c18c8d7b36d93cce7f?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/Azure/draft/pull/194/graphs/tree.svg?width=650&height=150&src=pr&token=PF70pQI5TU)](https://codecov.io/gh/Azure/draft/pull/194?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master     #194   +/-   ##
=======================================
  Coverage   32.97%   32.97%           
=======================================
  Files          18       18           
  Lines        1107     1107           
=======================================
  Hits          365      365           
  Misses        693      693           
  Partials       49       49
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/Azure/draft/pull/194?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/Azure/draft/pull/194?src=pr&el=footer). Last update [9b4b1b8...23b48f3](https://codecov.io/gh/Azure/draft/pull/194?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

bacongobbler: We are not going to move forward with this PR as this is code which we would eventually rip out, so we'd rather not put in code which users are going to write code around.

Please see the example in https://github.com/Azure/draft/issues/191#issuecomment-321613151 which you can use to configure the base domain with for the time being. Thanks!

Patch:
diff --git a/.github/workflows/integration-linux.yml b/.github/workflows/integration-linux.yml
index e31a743..567256c 100644
--- a/.github/workflows/integration-linux.yml
+++ b/.github/workflows/integration-linux.yml
@@ -132,10 +132,22 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: |
+          ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type helm
+          pwd
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
+          pwd
           ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1  
       - name: Validate JSON
         run: |
@@ -247,7 +259,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type kustomize
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
@@ -355,7 +376,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp
+      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp --deploy-type manifests
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - uses: actions/upload-artifact@v3
         with:
           name: gomodule-manifests-create
@@ -516,10 +546,22 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:8080
           kill $tunnelPID
-      - run: ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: |
+          ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type helm
+          pwd
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
+          pwd
           ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1  
       - name: Validate JSON
         run: |
@@ -631,7 +673,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:8080
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type kustomize
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
@@ -739,7 +790,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:8080
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp
+      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp --deploy-type manifests
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - uses: actions/upload-artifact@v3
         with:
           name: go-manifests-create
@@ -900,10 +960,22 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: |
+          ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type helm
+          pwd
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
+          pwd
           ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1  
       - name: Validate JSON
         run: |
@@ -1015,7 +1087,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type kustomize
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
@@ -1123,7 +1204,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp
+      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp --deploy-type manifests
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - uses: actions/upload-artifact@v3
         with:
           name: python-manifests-create
@@ -1284,10 +1374,22 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: |
+          ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type helm
+          pwd
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
+          pwd
           ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1  
       - name: Validate JSON
         run: |
@@ -1399,7 +1501,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type kustomize
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
@@ -1507,7 +1618,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp
+      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp --deploy-type manifests
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - uses: actions/upload-artifact@v3
         with:
           name: rust-manifests-create
@@ -1668,10 +1788,22 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: |
+          ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type helm
+          pwd
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
+          pwd
           ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1  
       - name: Validate JSON
         run: |
@@ -1783,7 +1915,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type kustomize
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
@@ -1891,7 +2032,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp
+      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp --deploy-type manifests
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - uses: actions/upload-artifact@v3
         with:
           name: javascript-manifests-create
@@ -2052,10 +2202,22 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: |
+          ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type helm
+          pwd
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
+          pwd
           ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1  
       - name: Validate JSON
         run: |
@@ -2167,7 +2329,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type kustomize
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
@@ -2275,7 +2446,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp
+      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp --deploy-type manifests
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - uses: actions/upload-artifact@v3
         with:
           name: ruby-manifests-create
@@ -2436,10 +2616,22 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: |
+          ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type helm
+          pwd
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
+          pwd
           ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1  
       - name: Validate JSON
         run: |
@@ -2551,7 +2743,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type kustomize
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
@@ -2659,7 +2860,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp
+      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp --deploy-type manifests
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - uses: actions/upload-artifact@v3
         with:
           name: csharp-manifests-create
@@ -2820,10 +3030,22 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: |
+          ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type helm
+          pwd
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
+          pwd
           ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1  
       - name: Validate JSON
         run: |
@@ -2935,7 +3157,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type kustomize
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
@@ -3043,7 +3274,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp
+      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp --deploy-type manifests
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - uses: actions/upload-artifact@v3
         with:
           name: java-manifests-create
@@ -3204,10 +3444,22 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: |
+          ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type helm
+          pwd
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
+          pwd
           ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1  
       - name: Validate JSON
         run: |
@@ -3319,7 +3571,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type kustomize
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
@@ -3427,7 +3688,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp
+      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp --deploy-type manifests
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - uses: actions/upload-artifact@v3
         with:
           name: gradle-manifests-create
@@ -3588,10 +3858,22 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: |
+          ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type helm
+          pwd
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
+          pwd
           ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1  
       - name: Validate JSON
         run: |
@@ -3703,7 +3985,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type kustomize
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
@@ -3811,7 +4102,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp
+      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp --deploy-type manifests
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - uses: actions/upload-artifact@v3
         with:
           name: swift-manifests-create
@@ -3972,10 +4272,22 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: |
+          ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type helm
+          pwd
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
+          pwd
           ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1  
       - name: Validate JSON
         run: |
@@ -4087,7 +4399,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type kustomize
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
@@ -4195,7 +4516,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp
+      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp --deploy-type manifests
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - uses: actions/upload-artifact@v3
         with:
           name: erlang-manifests-create
@@ -4356,10 +4686,22 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: |
+          ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type helm
+          pwd
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
+          pwd
           ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1  
       - name: Validate JSON
         run: |
@@ -4471,7 +4813,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type kustomize
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
@@ -4579,7 +4930,16 @@ jobs:
           echo 'Curling service IP'
           curl -m 3 $SERVICEIP:80
           kill $tunnelPID
-      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp
+      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp --deploy-type manifests
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \)             | xargs -I {} action-validator --verbose {}
       - uses: actions/upload-artifact@v3
         with:
           name: clojure-manifests-create
diff --git a/cmd/generate-workflow.go b/cmd/generate-workflow.go
index d78a565..78b6b96 100644
--- a/cmd/generate-workflow.go
+++ b/cmd/generate-workflow.go
@@ -1,27 +1,39 @@
 package cmd
 
 import (
-	"github.com/Azure/draft/pkg/workflows"
+	log "github.com/sirupsen/logrus"
 	"github.com/spf13/cobra"
 
-	log "github.com/sirupsen/logrus"
+	"github.com/Azure/draft/pkg/templatewriter"
+	"github.com/Azure/draft/pkg/templatewriter/writers"
+	"github.com/Azure/draft/pkg/workflows"
 )
 
+type generateWorkflowCmd struct {
+	workflowConfig workflows.WorkflowConfig
+	dest           string
+	deployType     string
+	flagVariables  []string
+	templateWriter templatewriter.TemplateWriter
+}
+
+var flagValuesMap map[string]string
+
 func newGenerateWorkflowCmd() *cobra.Command {
 
-	workflowConfig := &workflows.WorkflowConfig{}
-	dest := ""
+	gwCmd := &generateWorkflowCmd{}
+	gwCmd.dest = ""
 	var cmd = &cobra.Command{
 		Use:   "generate-workflow [flags]",
 		Short: "Generates a Github workflow for automatic build and deploy to AKS",
 		Long: `This command will generate a Github workflow to build and deploy an application containerized 
 with draft on AKS. This command assumes the 'setup-gh' command has been run properly.`,
 		RunE: func(cmd *cobra.Command, args []string) error {
-			workflowConfig.ValidateAndFillConfig()
-
+			if cmd.Flags().NFlag() != 0 {
+				flagValuesMap = gwCmd.workflowConfig.SetFlagValuesToMap()
+			}
 			log.Info("--> Generating Github workflow")
-
-			if err := workflows.CreateWorkflows(dest, workflowConfig); err != nil {
+			if err := workflows.CreateWorkflows(gwCmd.dest, gwCmd.deployType, gwCmd.flagVariables, gwCmd.templateWriter, flagValuesMap); err != nil {
 				return err
 			}
 
@@ -32,13 +44,15 @@ with draft on AKS. This command assumes the 'setup-gh' command has been run prop
 	}
 
 	f := cmd.Flags()
-	f.StringVarP(&workflowConfig.AksClusterName, "cluster-name", "c", "", "specify the AKS cluster name")
-	f.StringVarP(&workflowConfig.AcrName, "registry-name", "r", "", "specify the Azure container registry name")
-	f.StringVar(&workflowConfig.ContainerName, "container-name", "", "specify the container image name")
-	f.StringVarP(&workflowConfig.ResourceGroupName, "resource-group", "g", "", "Specify the Azure resource group of your AKS cluster")
-	f.StringVarP(&dest, "destination", "d", ".", "specify the path to the project directory")
-	f.StringVarP(&workflowConfig.BranchName, "branch", "b", "", "specify the Github branch to automatically deploy from")
-
+	f.StringVarP(&gwCmd.workflowConfig.AksClusterName, "cluster-name", "c", "", "specify the AKS cluster name")
+	f.StringVarP(&gwCmd.workflowConfig.AcrName, "registry-name", "r", "", "specify the Azure container registry name")
+	f.StringVar(&gwCmd.workflowConfig.ContainerName, "container-name", "", "specify the container image name")
+	f.StringVarP(&gwCmd.workflowConfig.ResourceGroupName, "resource-group", "g", "", "Specify the Azure resource group of your AKS cluster")
+	f.StringVarP(&gwCmd.dest, "destination", "d", ".", "specify the path to the project directory")
+	f.StringVarP(&gwCmd.workflowConfig.BranchName, "branch", "b", "", "specify the Github branch to automatically deploy from")
+	f.StringVar(&gwCmd.deployType, "deploy-type", "", "specify the type of deployment")
+	f.StringArrayVarP(&gwCmd.flagVariables, "variable", "", []string{}, "pass additional variables")
+	gwCmd.templateWriter = &writers.LocalFSWriter{}
 	return cmd
 }
 
diff --git a/pkg/osutil/osutil.go b/pkg/osutil/osutil.go
index 069c39f..eab99ae 100644
--- a/pkg/osutil/osutil.go
+++ b/pkg/osutil/osutil.go
@@ -97,6 +97,7 @@ func CopyDir(
 
 		srcPath := path.Join(src, f.Name())
 		destPath := path.Join(dest, f.Name())
+		log.Debugf("Source path: %s Dest path: %s", srcPath, destPath)
 
 		if f.IsDir() {
 			if err = templateWriter.EnsureDirectory(destPath); err != nil {
diff --git a/pkg/workflows/workflowconfig.go b/pkg/workflows/workflowconfig.go
index 9893adb..d52cb50 100644
--- a/pkg/workflows/workflowconfig.go
+++ b/pkg/workflows/workflowconfig.go
@@ -1,45 +1,34 @@
 package workflows
 
-import (
-	"github.com/Azure/draft/pkg/prompts"
-	"strings"
-)
-
 type WorkflowConfig struct {
-	AcrName            string
-	ContainerName      string
-	ResourceGroupName  string
-	AksClusterName     string
-	BranchName         string
-	ManifestsPath      string
-	ChartsPath         string
-	ChartsOverridePath string
-	KustomizePath      string
+	AcrName           string
+	ContainerName     string
+	ResourceGroupName string
+	AksClusterName    string
+	BranchName        string
 }
 
-func (config *WorkflowConfig) ValidateAndFillConfig() {
-	if config.AcrName == "" {
-		config.AcrName = strings.ToLower(prompts.GetInputFromPrompt("container registry name"))
+func (config *WorkflowConfig) SetFlagValuesToMap() map[string]string {
+	flagValuesMap := make(map[string]string)
+	if config.AcrName != "" {
+		flagValuesMap["AZURECONTAINERREGISTRY"] = config.AcrName
 	}
 
-	if config.ContainerName == "" {
-		config.ContainerName = strings.ToLower(prompts.GetInputFromPrompt("container name"))
+	if config.ContainerName != "" {
+		flagValuesMap["CONTAINERNAME"] = config.ContainerName
 	}
 
-	if config.ResourceGroupName == "" {
-		config.ResourceGroupName = prompts.GetInputFromPrompt("cluster resource group name")
+	if config.ResourceGroupName != "" {
+		flagValuesMap["RESOURCEGROUP"] = config.ResourceGroupName
 	}
 
-	if config.AksClusterName == "" {
-		config.AksClusterName = prompts.GetInputFromPrompt("AKS cluster name")
+	if config.AksClusterName != "" {
+		flagValuesMap["CLUSTERNAME"] = config.AksClusterName
 	}
 
-	if config.BranchName == "" {
-		config.BranchName = prompts.GetInputFromPrompt("name of the repository branch to deploy from, usually main")
+	if config.BranchName != "" {
+		flagValuesMap["BRANCHNAME"] = config.BranchName
 	}
 
-	config.ChartsPath = "./charts"
-	config.ChartsOverridePath = "./charts/production.yaml"
-	config.ManifestsPath = "./manifests"
-	config.KustomizePath = "./overlays/production"
+	return flagValuesMap
 }
diff --git a/pkg/workflows/workflows.go b/pkg/workflows/workflows.go
index bf9ddaa..8b6b79b 100644
--- a/pkg/workflows/workflows.go
+++ b/pkg/workflows/workflows.go
@@ -7,67 +7,83 @@ import (
 	"io/fs"
 	"io/ioutil"
 	"os"
+	"path"
+	"strings"
 
+	"github.com/manifoldco/promptui"
 	log "github.com/sirupsen/logrus"
+	"golang.org/x/exp/maps"
 	"gopkg.in/yaml.v3"
 	appsv1 "k8s.io/api/apps/v1"
 	"k8s.io/cli-runtime/pkg/printers"
 	"k8s.io/client-go/kubernetes/scheme"
 
-	"github.com/Azure/draft/pkg/filematches"
+	"github.com/Azure/draft/pkg/config"
+	"github.com/Azure/draft/pkg/embedutils"
 	"github.com/Azure/draft/pkg/osutil"
+	"github.com/Azure/draft/pkg/prompts"
+	"github.com/Azure/draft/pkg/templatewriter"
+	"github.com/Azure/draft/template"
 )
 
-//go:generate cp -r ../../starterWorkflows ./workflows
-
-var (
-	//go:embed workflows
-	workflows     embed.FS
-	parentDirName = "workflows"
-
-	workflowFilePrefix   = "azure-kubernetes-service"
-	deployNameToWorkflow = map[string]*workflowType{
-		"helm":      {deployPath: "/charts", workflowFileSuffix: "-helm"},
-		"kustomize": {deployPath: "/base", workflowFileSuffix: "-kustomize"},
-		"manifests": {deployPath: "/manifests"},
-	}
+const (
+	parentDirName  = "workflows"
+	configFileName = "/draft.yaml"
 )
 
-type workflowType struct {
-	deployPath         string
-	workflowFileSuffix string
+type Workflows struct {
+	workflows         map[string]fs.DirEntry
+	configs           map[string]*config.DraftConfig
+	dest              string
+	workflowTemplates fs.FS
 }
 
-func CreateWorkflows(dest string, config *WorkflowConfig) error {
-	deployType, err := filematches.FindDraftDeploymentFiles(dest)
-	if err != nil {
-		return err
+func CreateWorkflows(dest string, deployType string, flagVariables []string, templateWriter templatewriter.TemplateWriter, flagValuesMap map[string]string) error {
+	var err error
+	for _, flagVar := range flagVariables {
+		flagVarName, flagVarValue, ok := strings.Cut(flagVar, "=")
+		if !ok {
+			return fmt.Errorf("invalid variable format: %s", flagVar)
+		}
+		flagValuesMap[flagVarName] = flagVarValue
+		log.Debugf("flag variable %s=%s", flagVarName, flagVarValue)
 	}
 
-	if err = updateProductionDeployments(deployType, dest, config); err != nil {
-		return err
+	if deployType == "" {
+		selection := &promptui.Select{
+			Label: "Select k8s Deployment Type",
+			Items: []string{"helm", "kustomize", "manifests"},
+		}
+
+		_, deployType, err = selection.Run()
+		if err != nil {
+			return err
+		}
 	}
-	workflow, ok := deployNameToWorkflow[deployType]
+
+	workflow := createWorkflowsFromEmbedFS(template.Workflows, dest)
+	workflowConfig, ok := workflow.configs[deployType]
 	if !ok {
-		return errors.New("unsupported deployment type")
+		return errors.New("invalid deployment type")
+	}
+	customInputs, err := prompts.RunPromptsFromConfigWithSkips(workflowConfig, maps.Keys(flagValuesMap))
+	if err != nil {
+		return err
 	}
 
-	workflowTemplate := getWorkflowFile(workflow)
-
-	replaceWorkflowVars(deployType, config, workflowTemplate)
-
-	ghWorkflowPath := dest + "/.github/workflows/"
-	ghWorkflowFileName := ghWorkflowPath + workflowFilePrefix + workflow.workflowFileSuffix + ".yml"
-	log.Debugf("writing workflow to %s", ghWorkflowPath)
+	maps.Copy(customInputs, flagValuesMap)
 
-	return writeWorkflow(ghWorkflowPath, ghWorkflowFileName, *workflowTemplate)
+	if err = updateProductionDeployments(deployType, dest, flagValuesMap, templateWriter); err != nil {
+		return err
+	}
+	return workflow.createWorkflowFiles(deployType, customInputs, templateWriter)
 }
 
-func updateProductionDeployments(deployType, dest string, config *WorkflowConfig) error {
-	productionImage := fmt.Sprintf("%s.azurecr.io/%s", config.AcrName, config.ContainerName)
+func updateProductionDeployments(deployType, dest string, flagValuesMap map[string]string, templateWriter templatewriter.TemplateWriter) error {
+	productionImage := fmt.Sprintf("%s.azurecr.io/%s", flagValuesMap["AZURECONTAINERREGISTRY"], flagValuesMap["CONTAINERNAME"])
 	switch deployType {
 	case "helm":
-		return setHelmContainerImage(dest+"/charts/production.yaml", productionImage)
+		return setHelmContainerImage(dest+"/charts/production.yaml", productionImage, templateWriter)
 	case "kustomize":
 		return setDeploymentContainerImage(dest+"/overlays/production/deployment.yaml", productionImage)
 	case "manifests":
@@ -76,30 +92,6 @@ func updateProductionDeployments(deployType, dest string, config *WorkflowConfig
 	return nil
 }
 
-func replaceWorkflowVars(deployType string, config *WorkflowConfig, ghw *GitHubWorkflow) {
-	envMap := make(map[string]string)
-	envMap["AZURE_CONTAINER_REGISTRY"] = config.AcrName
-	envMap["CONTAINER_NAME"] = config.ContainerName
-	envMap["RESOURCE_GROUP"] = config.ResourceGroupName
-	envMap["CLUSTER_NAME"] = config.AksClusterName
-
-	switch deployType {
-	case "helm":
-		envMap["CHART_PATH"] = config.ChartsPath
-		envMap["CHART_OVERRIDE_PATH"] = config.ChartsOverridePath
-
-	case "manifests":
-		envMap["DEPLOYMENT_MANIFEST_PATH"] = config.ManifestsPath
-
-	case "kustomize":
-		envMap["KUSTOMIZE_PATH"] = config.KustomizePath
-	}
-
-	ghw.Env = envMap
-
-	ghw.On.Push.Branches[0] = config.BranchName
-}
-
 func setDeploymentContainerImage(filePath, productionImage string) error {
 
 	decode := scheme.Codecs.UniversalDeserializer().Decode
@@ -138,7 +130,7 @@ func setDeploymentContainerImage(filePath, productionImage string) error {
 	return printer.PrintObj(deploy, out)
 }
 
-func setHelmContainerImage(filePath, productionImage string) error {
+func setHelmContainerImage(filePath, productionImage string, templateWriter templatewriter.TemplateWriter) error {
 	file, err := ioutil.ReadFile(filePath)
 	if err != nil {
 		return err
@@ -157,35 +149,72 @@ func setHelmContainerImage(filePath, productionImage string) error {
 		return err
 	}
 
-	return ioutil.WriteFile(filePath, out, 0644)
+	return templateWriter.WriteFile(filePath, out)
 }
 
-func getWorkflowFile(workflow *workflowType) *GitHubWorkflow {
-	embedFilePath := parentDirName + "/" + workflowFilePrefix + workflow.workflowFileSuffix + ".yml"
+func (w *Workflows) loadConfig(deployType string) (*config.DraftConfig, error) {
+	val, ok := w.workflows[deployType]
+	if !ok {
+		return nil, fmt.Errorf("deploy type %s unsupported", deployType)
+	}
 
-	file, err := fs.ReadFile(workflows, embedFilePath)
+	configPath := path.Join(parentDirName, val.Name(), configFileName)
+	configBytes, err := fs.ReadFile(w.workflowTemplates, configPath)
 	if err != nil {
-		log.Fatal(err)
+		return nil, err
+	}
+
+	var draftConfig config.DraftConfig
+	if err = yaml.Unmarshal(configBytes, &draftConfig); err != nil {
+		return nil, err
 	}
 
-	var ghw GitHubWorkflow
+	return &draftConfig, nil
+}
 
-	err = yaml.Unmarshal(file, &ghw)
+func createWorkflowsFromEmbedFS(workflowTemplates embed.FS, dest string) *Workflows {
+	deployMap, err := embedutils.EmbedFStoMap(workflowTemplates, parentDirName)
 	if err != nil {
-		log.Fatalf("error: %v", err)
+		log.Fatal(err)
 	}
-	return &ghw
+
+	w := &Workflows{
+		workflows:         deployMap,
+		dest:              path.Join(dest, ".github", "workflows"),
+		configs:           make(map[string]*config.DraftConfig),
+		workflowTemplates: workflowTemplates,
+	}
+	w.populateConfigs()
+
+	return w
 }
 
-func writeWorkflow(ghWorkflowPath, workflowFileName string, ghw GitHubWorkflow) error {
-	workflowBytes, err := yaml.Marshal(ghw)
-	if err != nil {
-		return err
+func (w *Workflows) populateConfigs() {
+	for deployType := range w.workflows {
+		draftConfig, err := w.loadConfig(deployType)
+		if err != nil {
+			log.Debugf("no draftConfig found for workflow of deploy type %s", deployType)
+			draftConfig = &config.DraftConfig{}
+		}
+		w.configs[deployType] = draftConfig
+	}
+}
+
+func (w *Workflows) createWorkflowFiles(deployType string, customInputs map[string]string, templateWriter templatewriter.TemplateWriter) error {
+	val, ok := w.workflows[deployType]
+	if !ok {
+		return fmt.Errorf("deployment type: %s is not currently supported", deployType)
+	}
+	srcDir := path.Join(parentDirName, val.Name())
+	log.Debugf("source directory for workflow template: %s", srcDir)
+	workflowConfig, ok := w.configs[deployType]
+	if !ok {
+		workflowConfig = nil
 	}
 
-	if err := osutil.EnsureDirectory(ghWorkflowPath); err != nil {
+	if err := osutil.CopyDir(w.workflowTemplates, srcDir, w.dest, workflowConfig, customInputs, templateWriter); err != nil {
 		return err
 	}
 
-	return os.WriteFile(workflowFileName, workflowBytes, 0644)
+	return nil
 }
diff --git a/starterWorkflows/azure-kubernetes-service-kompose.yml b/starterWorkflows/azure-kubernetes-service-kompose.yml
deleted file mode 100644
index c2edcea..0000000
--- a/starterWorkflows/azure-kubernetes-service-kompose.yml
+++ /dev/null
@@ -1,121 +0,0 @@
-# This workflow will build and push an application to a Azure Kubernetes Service (AKS) cluster when you push your code
-#
-# This workflow assumes you have already created the target AKS cluster and have created an Azure Container Registry (ACR)
-# The ACR should be attached to the AKS cluster
-# For instructions see:
-#   - https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough-portal
-#   - https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal
-#   - https://learn.microsoft.com/en-us/azure/aks/cluster-container-registry-integration?tabs=azure-cli#configure-acr-integration-for-existing-aks-clusters
-#   - https://github.com/Azure/aks-create-action
-#
-# To configure this workflow:
-#
-# 1. Set the following secrets in your repository (instructions for getting these
-#    https://docs.microsoft.com/en-us/azure/developer/github/connect-from-azure?tabs=azure-cli%2Clinux):
-#    - AZURE_CLIENT_ID
-#    - AZURE_TENANT_ID
-#    - AZURE_SUBSCRIPTION_ID
-#
-# 2. Set the following environment variables (or replace the values below):
-#    - AZURE_CONTAINER_REGISTRY (name of your container registry / ACR)
-#    - CONTAINER_NAME (name of the container image you would like to push up to your ACR)
-#    - RESOURCE_GROUP (where your cluster is deployed)
-#    - CLUSTER_NAME (name of your AKS cluster)
-#    - IMAGE_PULL_SECRET_NAME (name of the ImagePullSecret that will be created to pull your ACR image)
-#
-# 3. Choose the appropriate render engine for the bake step https://github.com/Azure/k8s-bake. The config below assumes Kompose.
-#    Set your dockerComposeFile and kompose-version to suit your configuration.
-#    - DOCKER_COMPOSE_FILE_PATH (the path where your Kompose deployment manifest is located)
-#
-# For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions
-# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples
-# For more options with the actions used below please refer to https://github.com/Azure/login
-
-name: Build and deploy an app to AKS with Kompose
-
-on:
-  push:
-    branches: [$default-branch]
-  workflow_dispatch:
-
-env:
-  AZURE_CONTAINER_REGISTRY: "your-azure-container-registry"
-  CONTAINER_NAME: "your-container-name"
-  RESOURCE_GROUP: "your-resource-group"
-  CLUSTER_NAME: "your-cluster-name"
-  DOCKER_COMPOSE_FILE_PATH: "your-docker-compose-file-path"
-
-jobs:
-  buildImage:
-    permissions:
-      contents: read
-      id-token: write
-    runs-on: ubuntu-latest
-    steps:
-      # Checks out the repository this file is in
-      - uses: actions/checkout@v3
-
-      # Logs in with your Azure credentials
-      - name: Azure login
-        uses: azure/login@v1.4.6
-        with:
-          client-id: ${{ secrets.AZURE_CLIENT_ID }}
-          tenant-id: ${{ secrets.AZURE_TENANT_ID }}
-          subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
-
-      # Builds and pushes an image up to your Azure Container Registry
-      - name: Build and push image to ACR
-        run: |
-          az acr build --image ${{ env.AZURE_CONTAINER_REGISTRY }}.azurecr.io/${{ env.CONTAINER_NAME }}:${{ github.sha }} --registry ${{ env.AZURE_CONTAINER_REGISTRY }} -g ${{ env.RESOURCE_GROUP }} .
-
-  deploy:
-    permissions:
-      actions: read
-      contents: read
-      id-token: write
-    runs-on: ubuntu-latest
-    needs: [buildImage]
-    steps:
-      # Checks out the repository this file is in
-      - uses: actions/checkout@v3
-
-      # Logs in with your Azure credentials
-      - name: Azure login
-        uses: azure/login@v1.4.6
-        with:
-          client-id: ${{ secrets.AZURE_CLIENT_ID }}
-          tenant-id: ${{ secrets.AZURE_TENANT_ID }}
-          subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
-
-      # Use kubelogin to configure your kubeconfig for Azure auth
-      - name: Set up kubelogin for non-interactive login
-        uses: azure/use-kubelogin@v1
-        with:
-          kubelogin-version: 'v0.0.25'
-
-      # Retrieves your Azure Kubernetes Service cluster's kubeconfig file
-      - name: Get K8s context
-        uses: azure/aks-set-context@v3
-        with:
-          resource-group: ${{ env.RESOURCE_GROUP }}
-          cluster-name: ${{ env.CLUSTER_NAME }}
-          admin: 'false'
-          use-kubelogin: 'true'
-
-      # Runs Kompose to create manifest files
-      - name: Bake deployment
-        uses: azure/k8s-bake@v2
-        with:
-          renderEngine: "kompose"
-          dockerComposeFile: ${{ env.DOCKER_COMPOSE_FILE_PATH }}
-          kompose-version: "latest"
-        id: bake
-
-      # Deploys application based on manifest files from previous step
-      - name: Deploy application
-        uses: Azure/k8s-deploy@v4
-        with:
-          action: deploy
-          manifests: ${{ steps.bake.outputs.manifestsBundle }}
-          images: |
-            ${{ env.AZURE_CONTAINER_REGISTRY }}.azurecr.io/${{ env.CONTAINER_NAME }}:${{ github.sha }}
diff --git a/template/workflows.go b/template/workflows.go
new file mode 100644
index 0000000..083c250
--- /dev/null
+++ b/template/workflows.go
@@ -0,0 +1,8 @@
+package template
+
+import "embed"
+
+var (
+	//go:embed all:workflows
+	Workflows embed.FS
+)
diff --git a/starterWorkflows/azure-kubernetes-service-helm.yml b/template/workflows/helm/.github/workflows/azure-kubernetes-service-helm.yml
similarity index 94%
rename from starterWorkflows/azure-kubernetes-service-helm.yml
rename to template/workflows/helm/.github/workflows/azure-kubernetes-service-helm.yml
index c3b521e..66991d9 100644
--- a/starterWorkflows/azure-kubernetes-service-helm.yml
+++ b/template/workflows/helm/.github/workflows/azure-kubernetes-service-helm.yml
@@ -36,16 +36,16 @@ name: Build and deploy an app to AKS with Helm
 
 on:
   push:
-    branches: [$default-branch]
+    branches: [{{BRANCHNAME}}]
   workflow_dispatch:
 
 env:
-  AZURE_CONTAINER_REGISTRY: "your-azure-container-registry"
-  CONTAINER_NAME: "your-container-name"
-  RESOURCE_GROUP: "your-resource-group"
-  CLUSTER_NAME: "your-cluster-name"
-  CHART_PATH: "your-chart-path"
-  CHART_OVERRIDE_PATH: "your-chart-override-path"
+  AZURE_CONTAINER_REGISTRY: {{AZURECONTAINERREGISTRY}}
+  CONTAINER_NAME: {{CONTAINERNAME}}
+  RESOURCE_GROUP: {{RESOURCEGROUP}}
+  CLUSTER_NAME: {{CLUSTERNAME}}
+  CHART_PATH: {{CHARTPATH}}
+  CHART_OVERRIDE_PATH: {{CHARTOVERRIDEPATH}}
 
 jobs:
   buildImage:
diff --git a/template/workflows/helm/draft.yaml b/template/workflows/helm/draft.yaml
new file mode 100644
index 0000000..96dd6cc
--- /dev/null
+++ b/template/workflows/helm/draft.yaml
@@ -0,0 +1,18 @@
+variables:
+  - name: "AZURECONTAINERREGISTRY"
+    description: "the Azure container registry name"
+  - name: "CONTAINERNAME"
+    description: "the container image name"
+  - name: "RESOURCEGROUP"
+    description: "the Azure resource group of your AKS cluster"
+  - name: "CLUSTERNAME"
+    description: "the AKS cluster name"
+  - name: "BRANCHNAME"
+    description: "the Github branch to automatically deploy from"
+variableDefaults:
+  - name: "CHARTPATH"
+    value: "./charts"
+    disablePrompt: true
+  - name: "CHARTOVERRIDEPATH"
+    value: "./charts/production.yaml"
+    disablePrompt: true
\ No newline at end of file
diff --git a/starterWorkflows/azure-kubernetes-service-kustomize.yml b/template/workflows/kustomize/.github/workflows/azure-kubernetes-service-kustomize.yml
similarity index 94%
rename from starterWorkflows/azure-kubernetes-service-kustomize.yml
rename to template/workflows/kustomize/.github/workflows/azure-kubernetes-service-kustomize.yml
index 1b8aa99..75a1063 100644
--- a/starterWorkflows/azure-kubernetes-service-kustomize.yml
+++ b/template/workflows/kustomize/.github/workflows/azure-kubernetes-service-kustomize.yml
@@ -35,15 +35,15 @@ name: Build and deploy an app to AKS with Kustomize
 
 on:
   push:
-    branches: [$default-branch]
+    branches: [{{BRANCHNAME}}]
   workflow_dispatch:
 
 env:
-  AZURE_CONTAINER_REGISTRY: "your-azure-container-registry"
-  CONTAINER_NAME: "your-container-name"
-  RESOURCE_GROUP: "your-resource-group"
-  CLUSTER_NAME: "your-cluster-name"
-  KUSTOMIZE_PATH: "your-kustomize-path"
+  AZURE_CONTAINER_REGISTRY: {{AZURECONTAINERREGISTRY}}
+  CONTAINER_NAME: {{CONTAINERNAME}}
+  RESOURCE_GROUP: {{RESOURCEGROUP}}
+  CLUSTER_NAME: {{CLUSTERNAME}}
+  KUSTOMIZE_PATH: {{KUSTOMIZEPATH}}
 
 jobs:
   buildImage:
diff --git a/template/workflows/kustomize/draft.yaml b/template/workflows/kustomize/draft.yaml
new file mode 100644
index 0000000..43cdabc
--- /dev/null
+++ b/template/workflows/kustomize/draft.yaml
@@ -0,0 +1,15 @@
+variables:
+  - name: "AZURECONTAINERREGISTRY"
+    description: "the Azure container registry name"
+  - name: "CONTAINERNAME"
+    description: "the container image name"
+  - name: "RESOURCEGROUP"
+    description: "the Azure resource group of your AKS cluster"
+  - name: "CLUSTERNAME"
+    description: "the AKS cluster name"
+  - name: "BRANCHNAME"
+    description: "the Github branch to automatically deploy from"
+variableDefaults:
+  - name: "KUSTOMIZEPATH"
+    value: "./overlays/production"
+    disablePrompt: true
\ No newline at end of file
diff --git a/starterWorkflows/azure-kubernetes-service.yml b/template/workflows/manifests/.github/workflows/azure-kubernetes-service.yml
similarity index 93%
rename from starterWorkflows/azure-kubernetes-service.yml
rename to template/workflows/manifests/.github/workflows/azure-kubernetes-service.yml
index f3e266a..5bca672 100644
--- a/starterWorkflows/azure-kubernetes-service.yml
+++ b/template/workflows/manifests/.github/workflows/azure-kubernetes-service.yml
@@ -31,15 +31,15 @@ name: Build and deploy an app to AKS
 
 on:
   push:
-    branches: [$default-branch]
+    branches: [{{BRANCHNAME}}]
   workflow_dispatch:
 
 env:
-  AZURE_CONTAINER_REGISTRY: "your-azure-container-registry"
-  CONTAINER_NAME: "your-container-name"
-  RESOURCE_GROUP: "your-resource-group"
-  CLUSTER_NAME: "your-cluster-name"
-  DEPLOYMENT_MANIFEST_PATH: "your-deployment-manifest-path"
+  AZURE_CONTAINER_REGISTRY: {{AZURECONTAINERREGISTRY}}
+  CONTAINER_NAME: {{CONTAINERNAME}}
+  RESOURCE_GROUP: {{RESOURCEGROUP}}
+  CLUSTER_NAME: {{CLUSTERNAME}}
+  DEPLOYMENT_MANIFEST_PATH: {{DEPLOYMENTMANIFESTPATH}}
 
 jobs:
   buildImage:
diff --git a/template/workflows/manifests/draft.yaml b/template/workflows/manifests/draft.yaml
new file mode 100644
index 0000000..4c9c25d
--- /dev/null
+++ b/template/workflows/manifests/draft.yaml
@@ -0,0 +1,15 @@
+variables:
+  - name: "AZURECONTAINERREGISTRY"
+    description: "the Azure container registry name"
+  - name: "CONTAINERNAME"
+    description: "the container image name"
+  - name: "RESOURCEGROUP"
+    description: "the Azure resource group of your AKS cluster"
+  - name: "CLUSTERNAME"
+    description: "the AKS cluster name"
+  - name: "BRANCHNAME"
+    description: "the Github branch to automatically deploy from"
+variableDefaults:
+  - name: "DEPLOYMENTMANIFESTPATH"
+    value: "./manifests"
+    disablePrompt: true
\ No newline at end of file


Test patch:
diff --git a/pkg/workflows/workflowconfig_test.go b/pkg/workflows/workflowconfig_test.go
deleted file mode 100644
index 51a6891..0000000
--- a/pkg/workflows/workflowconfig_test.go
+++ /dev/null
@@ -1,21 +0,0 @@
-package workflows
-
-import (
-	"github.com/stretchr/testify/assert"
-	"testing"
-)
-
-func TestValidateConfig(t *testing.T) {
-	config := &WorkflowConfig{
-		AcrName:           "Test",
-		ContainerName:     "Test",
-		ResourceGroupName: "test",
-		AksClusterName:    "test",
-		BranchName:        "test",
-	}
-	config.ValidateAndFillConfig()
-	assert.NotEmpty(t, config.KustomizePath)
-	assert.NotEmpty(t, config.ManifestsPath)
-	assert.NotEmpty(t, config.ChartsPath)
-	assert.NotEmpty(t, config.ChartsOverridePath)
-}
diff --git a/pkg/workflows/workflows_test.go b/pkg/workflows/workflows_test.go
index d640235..6f20eb5 100644
--- a/pkg/workflows/workflows_test.go
+++ b/pkg/workflows/workflows_test.go
@@ -9,6 +9,8 @@ import (
 	"github.com/stretchr/testify/assert"
 	appsv1 "k8s.io/api/apps/v1"
 	"k8s.io/client-go/kubernetes/scheme"
+
+	"github.com/Azure/draft/pkg/templatewriter/writers"
 )
 
 func createTempManifest(path string) (string, error) {
@@ -32,69 +34,68 @@ func createTempManifest(path string) (string, error) {
 	return file.Name(), nil
 }
 
-func TestWorkflowEmbed(t *testing.T) {
-	workflow := &workflowType{
-		deployPath:         "/charts",
-		workflowFileSuffix: "-helm",
+func createTempDeploymentFile(dirPath, fileName, path string) error {
+	err := os.MkdirAll(dirPath, 0755)
+	if err != nil {
+		return err
 	}
-
-	assert.NotEmptyf(t, getWorkflowFile(workflow), "workflow should be fetched from the embeded file system")
-}
-
-func TestWorkflowReplace(t *testing.T) {
-	config := &WorkflowConfig{
-		AcrName:           "test",
-		AksClusterName:    "test",
-		ContainerName:     "test",
-		ResourceGroupName: "test",
-		BranchName:        "test",
-
-		ChartsOverridePath: "testOverride",
-		KustomizePath:      "testKustomize",
+	file, err := os.Create(fileName)
+	if err != nil {
+		return err
 	}
+	defer file.Close()
 
-	ghw := &GitHubWorkflow{}
-	ghw.On.Push.Branches = []string{"branch"}
-	replaceWorkflowVars("", config, ghw)
-	assert.NotNil(t, ghw.Env, "check that replace will update a ghw's environment")
-
-	workflow, ok := deployNameToWorkflow["manifests"]
-	assert.True(t, ok)
-
-	ghw = getWorkflowFile(workflow)
-	origLen := len(ghw.Jobs["build"].Steps)
-	replaceWorkflowVars("manifests", config, ghw)
-	assert.Equal(t, origLen, len(ghw.Jobs["build"].Steps), "check step is deleted")
+	var source *os.File
+	source, err = os.Open(path)
+	if err != nil {
+		return err
+	}
+	defer source.Close()
 
-	workflow, ok = deployNameToWorkflow["helm"]
-	assert.True(t, ok)
+	_, err = io.Copy(file, source)
+	if err != nil {
+		return err
+	}
+	return nil
+}
+func TestCreateWorkflows(t *testing.T) {
+	dest := "."
+	deployType := "helm"
+	flagVariables := []string{}
+	templatewriter := &writers.LocalFSWriter{}
+	flagValuesMap := map[string]string{"AZURECONTAINERREGISTRY": "testAcr", "CONTAINERNAME": "testContainer", "RESOURCEGROUP": "testRG", "CLUSTERNAME": "testCluster", "BRANCHNAME": "testBranch"}
+	err := createTempDeploymentFile("charts", "charts/production.yaml", "../../test/templates/helm/charts/production.yaml")
+	assert.Nil(t, err)
+	assert.Nil(t, CreateWorkflows(dest, deployType, flagVariables, templatewriter, flagValuesMap))
+	os.RemoveAll("charts")
+	os.RemoveAll(".github")
 
-	ghw = getWorkflowFile(workflow)
-	replaceWorkflowVars("helm", config, ghw)
-	assert.Equal(t, "testOverride", ghw.Env["CHART_OVERRIDE_PATH"], "check helm envs are replaced")
+	deployType = "kustomize"
+	err = createTempDeploymentFile("overlays/production", "overlays/production/deployment.yaml", "../../test/templates/kustomize/overlays/production/deployment.yaml")
+	assert.Nil(t, err)
+	assert.Nil(t, CreateWorkflows(dest, deployType, flagVariables, templatewriter, flagValuesMap))
+	os.RemoveAll("overlays")
+	os.RemoveAll(".github")
 
-	workflow, ok = deployNameToWorkflow["kustomize"]
-	assert.True(t, ok)
+	deployType = "manifests"
+	err = createTempDeploymentFile("manifests", "manifests/deployment.yaml", "../../test/templates/manifests/manifests/deployment.yaml")
+	assert.Nil(t, err)
+	assert.Nil(t, CreateWorkflows(dest, deployType, flagVariables, templatewriter, flagValuesMap))
+	os.RemoveAll("manifests")
+	os.RemoveAll(".github")
 
-	ghw = getWorkflowFile(workflow)
-	replaceWorkflowVars("kustomize", config, ghw)
-	assert.Equal(t, "testKustomize", ghw.Env["KUSTOMIZE_PATH"], "check kustomize envs are replaces")
 }
-
 func TestUpdateProductionDeployments(t *testing.T) {
-	config := &WorkflowConfig{
-		AcrName:           "test",
-		ContainerName:     "test",
-		ResourceGroupName: "test",
-	}
-	assert.Nil(t, updateProductionDeployments("", ".", config))
+	flagValuesMap := map[string]string{"AZURECONTAINERREGISTRY": "testRegistry", "CONTAINERNAME": "testContainer"}
+	testTemplateWriter := &writers.LocalFSWriter{}
+	assert.Nil(t, updateProductionDeployments("", ".", flagValuesMap, testTemplateWriter))
 
 	helmFileName, _ := createTempManifest("../../test/templates/helm_prod_values.yaml")
 	deploymentFileName, _ := createTempManifest("../../test/templates/deployment.yaml")
 	defer os.Remove(helmFileName)
 	defer os.Remove(deploymentFileName)
 
-	assert.Nil(t, setHelmContainerImage(helmFileName, "testImage"))
+	assert.Nil(t, setHelmContainerImage(helmFileName, "testImage", testTemplateWriter))
 
 	helmDeploy := &HelmProductionYaml{}
 	assert.Nil(t, helmDeploy.LoadFromFile(helmFileName))
diff --git a/test/gen_integration.sh b/test/gen_integration.sh
index 16c71db..b7a7ca5 100755
--- a/test/gen_integration.sh
+++ b/test/gen_integration.sh
@@ -287,10 +287,23 @@ languageVariables:
           echo 'Curling service IP'
           curl -m 3 \$SERVICEIP:$serviceport
           kill \$tunnelPID
-      - run: ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: |
+          ./draft -b main -v generate-workflow -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type helm
+          pwd
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) \
+            | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
+          pwd
           ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ $ingress_test_args  
       - name: Validate JSON
         run: |
@@ -408,7 +421,17 @@ languageVariables:
           echo 'Curling service IP'
           curl -m 3 \$SERVICEIP:$serviceport
           kill \$tunnelPID
-      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer
+      - run: ./draft -v generate-workflow -b main -d ./langtest/ -c someAksCluster -r someRegistry -g someResourceGroup --container-name someContainer --deploy-type kustomize
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) \
+            | xargs -I {} action-validator --verbose {}
       - name: Execute dry run for update command
         run: |
           mkdir -p test/temp
@@ -522,7 +545,17 @@ languageVariables:
           echo 'Curling service IP'
           curl -m 3 \$SERVICEIP:$serviceport
           kill \$tunnelPID
-      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp
+      - run: ./draft -v generate-workflow -d ./langtest/ -b main -c someAksCluster -r localhost -g someResourceGroup --container-name testapp --deploy-type manifests
+      # Validate generated workflow yaml
+      - name: Install action-validator with asdf
+        uses: asdf-vm/actions/install@v1
+        with:
+          tool_versions: |
+            action-validator 0.1.2
+      - name: Lint Actions
+        run: |
+          find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) \
+            | xargs -I {} action-validator --verbose {}
       - uses: actions/upload-artifact@v3
         with:
           name: $lang-manifests-create
diff --git a/test/templates/manifests/manifests/deployment.yaml b/test/templates/manifests/manifests/deployment.yaml
index a67b925..ad3b254 100644
--- a/test/templates/manifests/manifests/deployment.yaml
+++ b/test/templates/manifests/manifests/deployment.yaml
@@ -18,4 +18,4 @@ spec:
         - name: test
           image: test
           ports:
-            - containerPort: test
\ No newline at end of file
+            - containerPort: 8000
\ No newline at end of file