feat: move ecr-login into its own task
This commit is contained in:
parent
ea9c914626
commit
01df38b424
@ -26,10 +26,12 @@ scan: build
|
|||||||
@echo "Scanning $(REGISTRY)/$(IMAGE):$(TAG) using Trivy"
|
@echo "Scanning $(REGISTRY)/$(IMAGE):$(TAG) using Trivy"
|
||||||
@trivy image $(TRIVY_OPTS) $(REGISTRY)/$(IMAGE):$(TAG)
|
@trivy image $(TRIVY_OPTS) $(REGISTRY)/$(IMAGE):$(TAG)
|
||||||
|
|
||||||
push: build
|
push: ecr-login build
|
||||||
@aws ecr-public get-login-password --region $(REGION) | docker login --username AWS --password-stdin $(REGISTRY)
|
|
||||||
@for t in $(TAG) latest $(EXTRA_TAGS); do echo "tag and push: $$t"; docker tag $(IMAGE):$(TAG) $(REGISTRY)/$(IMAGE):$$t && docker push $(REGISTRY)/$(IMAGE):$$t; done
|
@for t in $(TAG) latest $(EXTRA_TAGS); do echo "tag and push: $$t"; docker tag $(IMAGE):$(TAG) $(REGISTRY)/$(IMAGE):$$t && docker push $(REGISTRY)/$(IMAGE):$$t; done
|
||||||
|
|
||||||
|
ecr-login:
|
||||||
|
@aws ecr-public get-login-password --region $(REGION) | docker login --username AWS --password-stdin $(REGISTRY)
|
||||||
|
|
||||||
clean: rm-test-image rm-image
|
clean: rm-test-image rm-image
|
||||||
|
|
||||||
# Delete all untagged images
|
# Delete all untagged images
|
||||||
|
Loading…
Reference in New Issue
Block a user