-
Notifications
You must be signed in to change notification settings - Fork 214
Expand file tree
/
Copy pathaction.yml
More file actions
33 lines (29 loc) · 1.08 KB
/
action.yml
File metadata and controls
33 lines (29 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: e2e_generate_app
inputs:
PROJECT_KEY:
description: Project key to specify project to generate ("retail-app-demo", "retail-app-ext" or "retail-app-no-ext")
required: true
type: string
TEMPLATE_VERSION:
description: Version of the template to use for the project
required: false
type: string
outputs:
project_path:
description: Path to the generated project directory
value: ${{ steps.generate_project.outputs.project_path }}
runs:
using: composite
steps:
- name: Generate new project based on project-key
id: generate_project
run: |
COMMAND="node e2e/scripts/generate-project.js --project-key ${{ inputs.PROJECT_KEY }}"
if [[ -n "${{ inputs.TEMPLATE_VERSION }}" ]]; then
COMMAND="$COMMAND --templateVersion ${{ inputs.TEMPLATE_VERSION }}"
fi
$COMMAND
# Return path to the generated project
GENERATED_PROJECTS_DIR=$(node -e "console.log(require('./e2e/config.js').GENERATED_PROJECTS_DIR)")
echo "project_path=$GENERATED_PROJECTS_DIR/${{ inputs.PROJECT_KEY }}" >> $GITHUB_OUTPUT
shell: bash