File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,17 +43,16 @@ jobs:
4343 run : |
4444 aws ecr describe-repositories --repository-names ${{ steps.set-image-uris.outputs.ecr_repository }} --region ${{ vars.AWS_REGION }} || aws ecr create-repository --repository-name ${{ steps.set-image-uris.outputs.ecr_repository }} --region ${{ vars.AWS_REGION }}
4545
46- - name : Build Docker image
46+ - name : Build and push Docker image
4747 id : build-image-and-push-to-ecr
4848 run : |
49- docker buildx build --platform linux/arm64 -t ${{ vars.LAMBDA_FUNCTION_NAME }} --file Dockerfile.lambda .
50- docker tag ${{ vars.LAMBDA_FUNCTION_NAME }}:latest ${{ steps.set-image-uris.outputs.image_uri_latest }}
51-
52- - name : Push Docker image
53- id : push-docker-image
54- run : |
55- echo "Pushing ${{ steps.set-image-uris.outputs.image_uri_latest }}"
56- docker push ${{ steps.set-image-uris.outputs.image_uri_latest }}
49+ # Build and push in a single command
50+ docker buildx build \
51+ --platform linux/arm64 \
52+ --tag ${{ steps.set-image-uris.outputs.image_uri_latest }} \
53+ --file Dockerfile.lambda \
54+ --push \
55+ .
5756
5857 - name : Update Lambda function
5958 run : |
You can’t perform that action at this time.
0 commit comments