4343 type : boolean
4444 description : ' Build amd64 `without_adx` and `without_netgo_without_adx` images, and arm64 images'
4545 required : false
46+ private_build :
47+ type : boolean
48+ description : ' Build private images'
49+ required : false
4650
4751jobs :
4852 # matrix_builder generates a matrix that includes the roles selected in the input
@@ -109,16 +113,21 @@ jobs:
109113 credentials_json : ${{ secrets.GCR_SERVICE_KEY_SECRET }}
110114 - name : Set up Google Cloud SDK
111115 uses : google-github-actions/setup-gcloud@v1
112- - name : Authenticate docker with gcloud
116+
117+ - name : Authenticate Docker with gcloud
113118 run : |
114- gcloud auth configure-docker
119+ if [[ "${{ github.event.inputs.private_build }}" == "true" ]]; then
120+ gcloud auth configure-docker us-central1-docker.pkg.dev
121+ else
122+ gcloud auth configure-docker
123+ fi
115124
116125 - name : Build/Push ${{ matrix.role }} amd64 images with adx (default)
117126 env :
118127 IMAGE_TAG : ${{ inputs.docker_tag }}
119128 CADENCE_DEPLOY_KEY : ${{ secrets.CADENCE_DEPLOY_KEY }}
120129 run : |
121- make docker-build-${{ matrix.role }}-with-adx docker-push-${{ matrix.role }}-with-adx
130+ make docker-build-${{ matrix.role }}-with-adx docker-push-${{ matrix.role }}-with-adx CONTAINER_REGISTRY=${{ github.event.inputs.private_build == "true" && vars.PRIVATE_REGISTRY || vars.PUBLIC_REGISTRY }}
122131
123132 - name : Build/Push ${{ matrix.role }} amd64 images without netgo and without adx, arm64 images
124133 if : ${{ inputs.include_alternative_builds }}
@@ -128,7 +137,7 @@ jobs:
128137 run : |
129138 make docker-build-${{ matrix.role }}-without-adx docker-push-${{ matrix.role }}-without-adx \
130139 docker-build-${{ matrix.role }}-without-netgo-without-adx docker-push-${{ matrix.role }}-without-netgo-without-adx \
131- docker-cross-build-${{ matrix.role }}-arm docker-push-${{ matrix.role }}-arm
140+ docker-cross-build-${{ matrix.role }}-arm docker-push-${{ matrix.role }}-arm CONTAINER_REGISTRY=${{ github.event.inputs.private_build == "true" && vars.PRIVATE_REGISTRY || vars.PUBLIC_REGISTRY }}
132141
133142
134143
0 commit comments