From 54b3d4e1caa01cdcd106905be056ae262ebbcb5c Mon Sep 17 00:00:00 2001 From: Nithya Subramanian <98416062+nithyatsu@users.noreply.github.com> Date: Tue, 31 Oct 2023 08:46:16 -0700 Subject: [PATCH] Update container build to only push on merges (#726) * k8s guestbook application example for use in tutorial (#626) * copy over k8s guestbook application example for use in tutorial Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Jonathan Smith --------- Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com> Co-authored-by: Jonathan Smith * Upmerge 10-24 (#695) * Update get.radapp.dev references (#625) * Update get.radapp.dev refernces * Update vscode extension install * Update eShop Readme with new url links (#647) * Fix edge version download (#685) * Add Kuberenetes tutorial content (#620) * Add Kuberenetes tutorial content * Update demo/Chart/values.yaml Co-authored-by: Aaron Crawfis * Update demo/Chart/values.yaml Co-authored-by: Aaron Crawfis * k8s guestbook application example for use in tutorial (#626) * copy over k8s guestbook application example for use in tutorial Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Jonathan Smith --------- Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com> Co-authored-by: Jonathan Smith * Rebase to v0.26 * move chat templatesto samples --------- Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com> Co-authored-by: Aaron Crawfis Co-authored-by: Will <28876888+willtsai@users.noreply.github.com> Co-authored-by: Jonathan Smith Co-authored-by: Reshma Abdul Rahim Co-authored-by: Reshma Abdul Rahim <61033581+Reshrahim@users.noreply.github.com> * Revert changes to test.yaml --------- Signed-off-by: Aaron Crawfis Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com> Co-authored-by: Aaron Crawfis Co-authored-by: James Montemagno Co-authored-by: Ryan Nowak Co-authored-by: Will <28876888+willtsai@users.noreply.github.com> Co-authored-by: Jonathan Smith * Added a condition to allow Docker to fully setup during post-create before initializing the K3d cluster (#694) Co-authored-by: Reshma Abdul Rahim <61033581+Reshrahim@users.noreply.github.com> * conditional push to ghcr * nit * fix * nit * delete az login since unneccessary * add comment * nit * review comments --------- Signed-off-by: Will Tsai <28876888+willtsai@users.noreply.github.com> Signed-off-by: Aaron Crawfis Co-authored-by: Will <28876888+willtsai@users.noreply.github.com> Co-authored-by: Jonathan Smith Co-authored-by: Reshma Abdul Rahim <61033581+Reshrahim@users.noreply.github.com> Co-authored-by: Aaron Crawfis Co-authored-by: James Montemagno Co-authored-by: Ryan Nowak Co-authored-by: jasonviviano <83607984+jasonviviano@users.noreply.github.com> --- .github/workflows/build.yaml | 6 ++---- .github/workflows/validate-bicep.yaml | 6 ------ 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 272810c1..9e055d42 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,9 +20,7 @@ env: VERSION: ${{ github.event.pull_request.number || 'latest' }} # Use ghcr.io/radius-project/dev for PR build. Otherwise, use ghcr.io/radius-project. CONTAINER_REGISTRY: ${{ github.event.pull_request.number && 'ghcr.io/radius-project/dev' || 'ghcr.io/radius-project' }} - # Set to true to push images to registry. - PUSH_IMAGE: true - + jobs: build-ghcr: name: Build and push sample images to GHCR @@ -60,5 +58,5 @@ jobs: uses: docker/build-push-action@v4 with: context: ./${{ matrix.directory }} - push: ${{ env.PUSH_IMAGE }} + push: ${{ github.event_name == 'push' && true || false }} tags: ${{ env.CONTAINER_REGISTRY }}/${{ matrix.image }}:${{ env.VERSION }} diff --git a/.github/workflows/validate-bicep.yaml b/.github/workflows/validate-bicep.yaml index 0e53d6fa..14e817d7 100644 --- a/.github/workflows/validate-bicep.yaml +++ b/.github/workflows/validate-bicep.yaml @@ -31,12 +31,6 @@ jobs: steps: - name: Check out repo uses: actions/checkout@v2 - - name: az CLI login - run: | - az login --service-principal \ - --username ${{ secrets.AZURE_SP_TESTS_APPID }} \ - --password ${{ secrets.AZURE_SP_TESTS_PASSWORD }} \ - --tenant ${{ secrets.AZURE_SP_TESTS_TENANTID }} - name: Parse release version and set environment variables run: python ./.github/scripts/get_docs_version.py - name: Download rad-bicep