File tree Expand file tree Collapse file tree 2 files changed +25
-13
lines changed Expand file tree Collapse file tree 2 files changed +25
-13
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,11 @@ jobs:
2626 env :
2727 ECR_REGISTRY : public.ecr.aws
2828 ECR_REPOSITORY : v9i6s3d6/serverless-python
29- IMAGE_TAG : ${{ steps.get_tag.outputs.tag }}
29+ DOCKER_REPOSITORY : dnxsolutions/serverless-python
30+ IMAGE_TAG : dnx-${{ steps.get_tag.outputs.tag }}
3031 run : |
3132 apk add docker
3233 aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
33- docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
34- docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
35- docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:latest
36- docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
34+ export REPO=$ECR_REGISTRY/$ECR_REPOSITORY
35+ make build
36+ make push
Original file line number Diff line number Diff line change 1- DOCKER_REPO =dnxsolutions/serverless-python
2- DOCKER_TAG =dnx2
3- IMAGE_NAME =${DOCKER_REPO}:${DOCKER_TAG}
41
52build :
63 echo " Build specific tag/release"
74
85 # Python 3.6
96 docker build \
107 --build-arg base_image=python:3.6-slim \
11- -t ${DOCKER_REPO }:3.6-${DOCKER_TAG } \
8+ -t ${REPO }:3.6-${IMAGE_TAG } \
129 ./3.6/.
1310
1411 # Python 3.7
1512 docker build \
1613 --build-arg base_image=python:3.7-slim \
17- -t ${DOCKER_REPO }:3.7-${DOCKER_TAG } \
14+ -t ${REPO }:3.7-${IMAGE_TAG } \
1815 ./3.7/.
1916
2017 # Python 3.8
2118 docker build \
2219 --build-arg base_image=python:3.8-slim \
23- -t ${DOCKER_REPO }:3.8-${DOCKER_TAG } \
20+ -t ${REPO }:3.8-${IMAGE_TAG } \
2421 ./3.8/.
2522
2623 # Python 3.9
2724 docker build \
2825 --build-arg base_image=python:3.9-slim \
29- -t ${DOCKER_REPO}:3.9-${DOCKER_TAG} \
30- ./3.9/.
26+ -t ${REPO}:3.9-${IMAGE_TAG} \
27+ ./3.9/.
28+
29+ push :
30+ echo " Push specific tag/release"
31+
32+ # Python 3.6
33+ docker push ${REPO}:3.6-${IMAGE_TAG}
34+
35+ # Python 3.7
36+ docker push ${REPO}:3.7-${IMAGE_TAG}
37+
38+ # Python 3.8
39+ docker push ${REPO}:3.8-${IMAGE_TAG}
40+
41+ # Python 3.9
42+ docker push ${REPO}:3.9-${IMAGE_TAG}
You can’t perform that action at this time.
0 commit comments