-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
58 lines (55 loc) · 1.77 KB
/
action.yml
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Validate code using docker
description: Run docker services, test them and then remove them
inputs:
app-name:
description: Name of the Webapp
required: false
registry:
description: Provides current name of the registry
required: true
clean-branch-name:
description: Branch name that was pushed to registry
required: true
work-dir:
description: Location of all the docker files
required: false
fastapi-parameter:
description: Extra URL parameter for openapi
required: false
container-name:
description: Name of the docker container for webapp
required: false
default: webapp
dev-arg:
description: Parameter to detect dev dependencies
required: false
runs:
using: "composite"
steps:
- name: Docker Up
env:
APP_NAME: ${{ inputs.app-name }}
REGISTRY: ${{ inputs.registry }}
CLEAN_BRANCH_NAME: ${{ inputs.clean-branch-name }}
WORK_DIR: ${{ inputs.work-dir }}
run: ${{ github.action_path }}/scripts/DockerUp.sh
shell: bash
- name: Run docker tests
env:
APP_NAME: ${{ inputs.app-name }}
CLEAN_BRANCH_NAME: ${{ inputs.clean-branch-name }}
WORK_DIR: ${{ inputs.work-dir }}
FAST_PARA: ${{ inputs.fastapi-parameter }}
CONTAINER_NAME: ${{ inputs.container-name }}
DEV_ARG: ${{ inputs.dev-arg }}
run: ${{ github.action_path }}/scripts/ValidateCode.sh
shell: bash
- name: Docker Down
if: ${{ always() }}
env:
APP_NAME: ${{ inputs.app-name }}
REGISTRY: ${{ inputs.registry }}
CLEAN_BRANCH_NAME: ${{ inputs.clean-branch-name }}
WORK_DIR: ${{ inputs.work-dir }}
run: ${{ github.action_path }}/scripts/DockerDown.sh
shell: bash