diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index b3e1670af33..e2f33675ec8 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -43,10 +43,6 @@ on: type: boolean description: 'Build amd64 `without_adx` and `without_netgo_without_adx` images, and arm64 images' required: false - private_build: - type: boolean - description: 'Build private images' - required: false jobs: # matrix_builder generates a matrix that includes the roles selected in the input @@ -86,7 +82,7 @@ jobs: docker-push: name: ${{ matrix.role }} images runs-on: ubuntu-latest - environment: Production Docker Registry + environment: Private Registry Builds needs: matrix_builder # setup jobs for each role @@ -110,33 +106,20 @@ jobs: - id: auth uses: google-github-actions/auth@v1 with: - credentials_json: ${{ secrets.GCR_SERVICE_KEY_SECRET }} + credentials_json: ${{ secrets.PRIVATE_REGISTRY_UPLOAD_SECRET }} - name: Set up Google Cloud SDK uses: google-github-actions/setup-gcloud@v1 - name: Authenticate Docker with gcloud run: | - if [[ "${{ github.event.inputs.private_build }}" == "true" ]]; then - gcloud auth configure-docker us-central1-docker.pkg.dev - else - gcloud auth configure-docker - fi - - - name: Set CONTAINER_REGISTRY - id: set-registry - run: | - if [[ "${{ github.event.inputs.private_build }}" == "true" ]]; then - echo "CONTAINER_REGISTRY=${{ vars.PRIVATE_REGISTRY }}" >> $GITHUB_ENV - else - echo "CONTAINER_REGISTRY=${{ vars.PUBLIC_REGISTRY }}" >> $GITHUB_ENV - fi + gcloud auth configure-docker us-central1-docker.pkg.dev - name: Build/Push ${{ matrix.role }} amd64 images with adx (default) env: IMAGE_TAG: ${{ inputs.docker_tag }} CADENCE_DEPLOY_KEY: ${{ secrets.CADENCE_DEPLOY_KEY }} run: | - make docker-build-${{ matrix.role }}-with-adx docker-push-${{ matrix.role }}-with-adx CONTAINER_REGISTRY=$CONTAINER_REGISTRY + make docker-build-${{ matrix.role }}-with-adx docker-push-${{ matrix.role }}-with-adx CONTAINER_REGISTRY=${{ vars.PRIVATE_REGISTRY }} - name: Build/Push ${{ matrix.role }} amd64 images without netgo and without adx, arm64 images if: ${{ inputs.include_alternative_builds }} @@ -146,7 +129,5 @@ jobs: run: | make docker-build-${{ matrix.role }}-without-adx docker-push-${{ matrix.role }}-without-adx \ docker-build-${{ matrix.role }}-without-netgo-without-adx docker-push-${{ matrix.role }}-without-netgo-without-adx \ - docker-cross-build-${{ matrix.role }}-arm docker-push-${{ matrix.role }}-arm CONTAINER_REGISTRY=$CONTAINER_REGISTRY - + docker-cross-build-${{ matrix.role }}-arm docker-push-${{ matrix.role }}-arm CONTAINER_REGISTRY=${{ vars.PRIVATE_REGISTRY }} -