2222 sha :
2323 description : ' the github sha to release'
2424 required : true
25+ update-latest :
26+ description : ' update the latest tag in the repos (default: true)'
27+ required : false
28+ default : ' true'
29+ mirror-operator :
30+ description : ' mirror the operator (default: true)'
31+ required : false
32+ default : ' true'
2533
2634env :
2735 IMAGE_NAME : aws-otel-collector
@@ -346,15 +354,19 @@ jobs:
346354 TAG=`cat build/packages/VERSION`
347355 aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/aws-observability
348356 docker tag $IMAGE_NAME public.ecr.aws/$ECR_REPO:$TAG
349- docker tag $IMAGE_NAME public.ecr.aws/$ECR_REPO:latest
350357 docker push public.ecr.aws/$ECR_REPO:$TAG
351- docker push public.ecr.aws/$ECR_REPO:latest
352- cd adot/tools/release/adot-operator-images-mirror && go run ./
358+ if [ ${{ github.event.inputs.update-latest }} == 'true' ]; then
359+ docker tag $IMAGE_NAME public.ecr.aws/$ECR_REPO:latest
360+ docker push public.ecr.aws/$ECR_REPO:latest
361+ fi
362+ if [ ${{ github.event.inputs.mirror-operator }} == 'true' ]; then
363+ cd adot/tools/release/adot-operator-images-mirror && go run ./
364+ fi
353365
354366 - name : Login Dockerhub
355367 uses : docker/login-action@v1
356368 with :
357- username : " mxiamxia "
369+ username : " ${{ secrets.DOCKERHUB_RELEASE_USERNAME }} "
358370 password : " ${{ secrets.DOCKERHUB_RELEASE_TOKEN }}"
359371
360372 - name : Push Image to dockerhub
@@ -363,9 +375,11 @@ jobs:
363375 TAG=`cat build/packages/VERSION`
364376 REPO_NAME="$IMAGE_NAMESPACE/$IMAGE_NAME"
365377 docker tag $IMAGE_NAME $REPO_NAME:$TAG
366- docker tag $IMAGE_NAME $REPO_NAME:latest
367378 docker push $REPO_NAME:$TAG
368- docker push $REPO_NAME:latest
379+ if [ ${{ github.event.inputs.update-latest }} == 'true' ]; then
380+ docker tag $IMAGE_NAME $REPO_NAME:latest
381+ docker push $REPO_NAME:latest
382+ fi
369383
370384
371385 release-validation-ecs :
0 commit comments