File tree 4 files changed +13
-5
lines changed
{{cookiecutter.git_repo_name}}
4 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 14
14
"include_webpages" : [" n" , " y" ],
15
15
"container_runtime" : [" podman" , " docker" ],
16
16
"__template_repo" : " https://github.com/btr1975/cookiecutter-python-fastapi-openapi" ,
17
- "__template_version" : " 1.0.6 " ,
17
+ "__template_version" : " 1.0.7 " ,
18
18
"_new_lines" :" \n " ,
19
19
"_copy_without_render" : [
20
20
" {{cookiecutter.__app_name}}/templates" ,
Original file line number Diff line number Diff line change @@ -24,12 +24,12 @@ build:
24
24
25
25
{% if cookiecutter.container_runtime == "podman" %}
26
26
build-container :
27
- @cd containers && podman build --ssh=default -t {{ cookiecutter.git_repo_name }}:latest -f Containerfile
27
+ @cd containers && podman build --ssh=default –build-arg=build_branch=main -t {{ cookiecutter.git_repo_name }}:latest -f Containerfile
28
28
{% endif %}
29
29
30
30
{% if cookiecutter.container_runtime == "docker" %}
31
31
build-container :
32
- @cd containers && docker build --ssh=default -t {{ cookiecutter.git_repo_name }}:latest -f Dockerfile
32
+ @cd containers && docker build --ssh=default -t –build-arg=build_branch=main {{ cookiecutter.git_repo_name }}:latest -f Dockerfile
33
33
{% endif %}
34
34
35
35
coverage :
Original file line number Diff line number Diff line change @@ -9,8 +9,12 @@ RUN ${PIP_INSTALL_COMMAND} --upgrade pip setuptools wheel \
9
9
10
10
FROM base AS final
11
11
12
+ ARG build_branch=main
13
+
14
+ ENV BUILD_BRANCH=${build_branch}
15
+
12
16
RUN --mount=type=ssh,required=true \
13
- ${PIP_INSTALL_COMMAND} git+ssh://git@github.com/{{ cookiecutter.git_username }}/{{ cookiecutter.git_repo_name }}
17
+ ${PIP_INSTALL_COMMAND} git+ssh://git@github.com/{{ cookiecutter.git_username }}/{{ cookiecutter.git_repo_name }}@${BUILD_BRANCH}
14
18
15
19
EXPOSE 8080/tcp
16
20
Original file line number Diff line number Diff line change @@ -9,8 +9,12 @@ RUN ${PIP_INSTALL_COMMAND} --upgrade pip setuptools wheel \
9
9
10
10
FROM base AS final
11
11
12
+ ARG build_branch=main
13
+
14
+ ENV BUILD_BRANCH=${build_branch}
15
+
12
16
RUN --mount=type=ssh,required=true \
13
- ${PIP_INSTALL_COMMAND} git+ssh://git@github.com/{{ cookiecutter.git_username }}/{{ cookiecutter.git_repo_name }}
17
+ ${PIP_INSTALL_COMMAND} git+ssh://git@github.com/{{ cookiecutter.git_username }}/{{ cookiecutter.git_repo_name }}@${BUILD_BRANCH}
14
18
15
19
EXPOSE 8080/tcp
16
20
You can’t perform that action at this time.
0 commit comments