Skip to content

Commit d614888

Browse files
authored
Push stable images to dockerhub (#3)
* push to dockerhub * Use scratch image
1 parent d2d91ab commit d614888

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FROM alpine:3.7
1+
FROM scratch
22
COPY aws/ /aws
33
WORKDIR /aws

codefresh.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,44 @@ steps:
4343
all:
4444
executeForBranch: "'${{SEMVERSION_BRANCH}}' != ''"
4545

46-
push_image_tag:
46+
push_image_tag_to_cfcr:
4747
title: Push image with tag based semver tags
4848
type: push
49+
registry: cfcr
4950
candidate: ${{build_image}}
5051
tag: "${{SEMVERSION_TAG}}"
5152
when:
5253
condition:
5354
all:
5455
executeForTag: "'${{SEMVERSION_TAG}}' != ''"
5556

56-
push_image_latest:
57+
push_image_tag_to_dockerhub:
58+
title: Push image with tag based semver tags
59+
type: push
60+
registry: dockerhub
61+
candidate: ${{build_image}}
62+
tag: "${{SEMVERSION_TAG}}"
63+
when:
64+
condition:
65+
all:
66+
executeForTag: "'${{SEMVERSION_TAG}}' != ''"
67+
68+
69+
push_image_latest_to_cfcf:
70+
title: Push image with latest tag
71+
type: push
72+
registry: cfcr
73+
candidate: ${{build_image}}
74+
tag: latest
75+
when:
76+
condition:
77+
all:
78+
executeForMasterBranch: "'${{CF_BRANCH}}' == 'master'"
79+
80+
push_image_latest_to_dockerhub:
5781
title: Push image with latest tag
5882
type: push
83+
registry: dockerhub
5984
candidate: ${{build_image}}
6085
tag: latest
6186
when:

0 commit comments

Comments
 (0)