From ba54da343f8a19f60fcbb9fb56cde2a1750d9692 Mon Sep 17 00:00:00 2001 From: nithyatsu Date: Tue, 17 Oct 2023 10:27:50 -0700 Subject: [PATCH 1/7] test cahnges --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9acbc809..95feab67 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Project Radius Samples +# Radius Project Samples This repository contains the source code for quickstarts, reference apps, and tutorials for Project Radius. @@ -21,3 +21,4 @@ The current repository offers a codespace setup with Radius and its dependencies | **eshop** | A Rad-ified version of eShop on Containers, the .NET reference app | **eshop-dapr** | A Rad-ified version of eShop on Dapr | **volumes** | An app to interact with mounted volumes +|**test-entry**| test From 5a9adf3f53941e8435f3ab4990f0ea4e1343f85e Mon Sep 17 00:00:00 2001 From: nithyatsu Date: Tue, 17 Oct 2023 11:15:33 -0700 Subject: [PATCH 2/7] wip --- .github/workflows/build.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4c92733f..6b43d1b3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,6 +12,8 @@ on: - edge - v*.* +permissions: write-all + concurrency: group: build-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true From 737d6f4be91ab0ec4235c9de36a70d4b02df2719 Mon Sep 17 00:00:00 2001 From: nithyatsu Date: Tue, 17 Oct 2023 11:29:15 -0700 Subject: [PATCH 3/7] wip --- .github/workflows/build.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6b43d1b3..6b5f2299 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -103,6 +103,9 @@ jobs: context: ./${{ matrix.directory }} push: ${{ env.PUSH_IMAGE }} tags: ${{ env.CONTAINER_REGISTRY }}/${{ matrix.image }}:${{ env.VERSION }} + permissions: + contents: read + packages: write # TODO_LAUNCH: Remove this job once we opensource the repo because all pkgs will be cleaned up regularly - https://github.com/radius-project/samples/issues/439 cleanup: From 042d3f084b1bc1591952bff211dcf45311e8c079 Mon Sep 17 00:00:00 2001 From: nithyatsu Date: Tue, 17 Oct 2023 11:33:33 -0700 Subject: [PATCH 4/7] test --- .github/workflows/build.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6b5f2299..1338739e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,6 +32,9 @@ jobs: # TODO_LAUNCH: Remove this build job once we opensource the repo - https://github.com/radius-project/samples/issues/439 build-acr: name: Build and push sample images to ACR + permissions: + contents: read + packages: write if: github.event.action != 'closed' runs-on: ubuntu-latest strategy: From 10bdc81d7d1c989c272a703bec314a114bb0b7d7 Mon Sep 17 00:00:00 2001 From: nithyatsu Date: Tue, 17 Oct 2023 11:47:19 -0700 Subject: [PATCH 5/7] checkin latest --- .github/workflows/build.yaml | 73 +----------------------------------- 1 file changed, 1 insertion(+), 72 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1338739e..272810c1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,62 +12,18 @@ on: - edge - v*.* -permissions: write-all - concurrency: group: build-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true env: VERSION: ${{ github.event.pull_request.number || 'latest' }} - # Use radiusdev.azurecr.io for PR build. Otherwise, use radius.azurecr.io. - # TODO_LAUNCH: Remove this env var once we opensource the repo - https://github.com/radius-project/samples/issues/439 - DOCKER_REGISTRY: ${{ github.event.pull_request.number && 'radiusdev.azurecr.io' || 'radius.azurecr.io' }} - # Use radiusdev.azurecr.io for PR build. Otherwise, use radius.azurecr.io. + # 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: - # TODO_LAUNCH: Remove this build job once we opensource the repo - https://github.com/radius-project/samples/issues/439 - build-acr: - name: Build and push sample images to ACR - permissions: - contents: read - packages: write - if: github.event.action != 'closed' - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - directory: samples/demo/ - image: samples/demo - - directory: samples/dapr/ui/ - image: samples/dapr-frontend - - directory: samples/dapr/nodeapp/ - image: samples/dapr-backend - - directory: samples/aws/ - image: samples/aws - - directory: samples/aws-sqs/ - image: samples/aws-sqs - - directory: samples/volumes/ - image: samples/volumes - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Login to container registry - uses: azure/docker-login@v1 - with: - login-server: ${{ env.DOCKER_REGISTRY }} - username: '${{ secrets.AZURE_SP_DOCKER_USERNAME }}' - password: '${{ secrets.AZURE_SP_DOCKER_PASSWORD }}' - - name: Build and push ${{ matrix.image }} - uses: docker/build-push-action@v4 - with: - context: ./${{ matrix.directory }} - push: ${{ env.PUSH_IMAGE }} - tags: ${{ env.DOCKER_REGISTRY }}/${{ matrix.image }}:${{ env.VERSION }} build-ghcr: name: Build and push sample images to GHCR if: github.event.action != 'closed' @@ -106,30 +62,3 @@ jobs: context: ./${{ matrix.directory }} push: ${{ env.PUSH_IMAGE }} tags: ${{ env.CONTAINER_REGISTRY }}/${{ matrix.image }}:${{ env.VERSION }} - permissions: - contents: read - packages: write - - # TODO_LAUNCH: Remove this job once we opensource the repo because all pkgs will be cleaned up regularly - https://github.com/radius-project/samples/issues/439 - cleanup: - name: Cleanup ${{ matrix.image }} - if: github.event.action == 'closed' - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - image: [ - samples/demo, - samples/dapr-frontend, - samples/dapr-backend, - samples/aws, - samples/aws-sqs, - samples/volumes - ] - steps: - - name: Login to az cli and ACR - run: | - az login --service-principal --username ${{ secrets.AZURE_SP_DOCKER_USERNAME }} --password ${{ secrets.AZURE_SP_DOCKER_PASSWORD }} --tenant ${{ secrets.AZURE_SP_DOCKER_TENANT }} - az acr login --name ${{ env.DOCKER_REGISTRY }} - - name: Delete PR images - run: az acr repository delete --name ${{ env.DOCKER_REGISTRY }} --image "${{ matrix.image }}:${{ env.VERSION }}" --yes From 52d88b3221bb22bd3d5102f032605a6b6d7ded73 Mon Sep 17 00:00:00 2001 From: nithyatsu Date: Tue, 17 Oct 2023 11:48:18 -0700 Subject: [PATCH 6/7] wip --- .github/workflows/build.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 272810c1..8785dca0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,6 +12,8 @@ on: - edge - v*.* +permissions: write-all + concurrency: group: build-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true From 638d41451f2460af38b3b986765f5c5c4b7817c8 Mon Sep 17 00:00:00 2001 From: nithyatsu Date: Tue, 17 Oct 2023 11:58:10 -0700 Subject: [PATCH 7/7] test --- .github/workflows/build.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8785dca0..14551e45 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,6 +24,9 @@ env: 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 + GITHUB_TOKEN: ${{ secrets.GH_RAD_CI_BOT_PAT }} + GITHUB_EMAIL: 'radiuscoreteam@service.microsoft.com' + GITHUB_USER: 'Radius CI Bot' jobs: build-ghcr: