From dd9dcf7a17f9b0bb65dfb34b6e72b3bfc9f30140 Mon Sep 17 00:00:00 2001 From: Sebastian Melchior <801781+smelchior@users.noreply.github.com> Date: Fri, 7 Nov 2025 06:24:27 +0100 Subject: [PATCH 01/14] feat: add cloudrun deploy jobs --- .github/workflows/deploy-cloudrun.yaml | 61 ++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/deploy-cloudrun.yaml diff --git a/.github/workflows/deploy-cloudrun.yaml b/.github/workflows/deploy-cloudrun.yaml new file mode 100644 index 00000000..57a09188 --- /dev/null +++ b/.github/workflows/deploy-cloudrun.yaml @@ -0,0 +1,61 @@ +name: 'Reusable gcp cloudrun deploy workflow' + +on: + workflow_call: + inputs: + job-name: + required: false + type: string + service-name: + required: false + type: string + registry: + required: true + type: string + artifact-repository: + required: true + type: string + artifact-tag: + required: true + type: string + region: + required: true + type: string + workload-identity-provider: + required: true + type: string + workload-identity-service-account-mail: + required: true + type: string +jobs: + deploy_cloudrun: + name: Deployment job + permissions: + contents: 'read' + id-token: 'write' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: 'google-github-actions/auth@v3' + with: + service_account: ${{ inputs.workload-identity-service-account-mail }} + workload_identity_provider: ${{ inputs.workload-identity-provider }} + - name: 'Set up gcloud-cli' + uses: 'google-github-actions/setup-gcloud@v3' + with: + version: '>= 363.0.0' + - name: 'deploy cloudrun job' + if: inputs.job-name != '' + uses: 'google-github-actions/deploy-cloudrun@v3' + with: + image: ${{ inputs.registry }}${{ inputs.artifact-repository }}:${{ inputs.artifact-tag }} + region: ${{ inputs.region }} + job: ${{ inputs.job-name }} + - name: 'deploy cloudrun service' + if: inputs.service-name != '' + uses: 'google-github-actions/deploy-cloudrun@v3' + with: + image: ${{ inputs.registry }}${{ inputs.artifact-repository }}:${{ inputs.artifact-tag }} + region: ${{ inputs.region }} + service: ${{ inputs.service-name }} + From 9666519e231508c407f1dc5c7edb3d2a0156ea82 Mon Sep 17 00:00:00 2001 From: Sebastian Melchior <801781+smelchior@users.noreply.github.com> Date: Fri, 7 Nov 2025 10:29:56 +0100 Subject: [PATCH 02/14] fix: review items --- .github/workflows/deploy-cloudrun.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-cloudrun.yaml b/.github/workflows/deploy-cloudrun.yaml index 57a09188..40460846 100644 --- a/.github/workflows/deploy-cloudrun.yaml +++ b/.github/workflows/deploy-cloudrun.yaml @@ -36,26 +36,27 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Validate inputs + run: | + if [[ -z "${{ inputs.job-name }}" && -z "${{ inputs.service-name }}" ]]; then + echo "Error: at least one of 'job-name' or 'service-name' must be provided" + exit 1 + fi - uses: 'google-github-actions/auth@v3' with: service_account: ${{ inputs.workload-identity-service-account-mail }} workload_identity_provider: ${{ inputs.workload-identity-provider }} - - name: 'Set up gcloud-cli' - uses: 'google-github-actions/setup-gcloud@v3' - with: - version: '>= 363.0.0' - name: 'deploy cloudrun job' if: inputs.job-name != '' uses: 'google-github-actions/deploy-cloudrun@v3' with: - image: ${{ inputs.registry }}${{ inputs.artifact-repository }}:${{ inputs.artifact-tag }} + image: ${{ inputs.registry }}/${{ inputs.artifact-repository }}:${{ inputs.artifact-tag }} region: ${{ inputs.region }} job: ${{ inputs.job-name }} - name: 'deploy cloudrun service' if: inputs.service-name != '' uses: 'google-github-actions/deploy-cloudrun@v3' with: - image: ${{ inputs.registry }}${{ inputs.artifact-repository }}:${{ inputs.artifact-tag }} + image: ${{ inputs.registry }}/${{ inputs.artifact-repository }}:${{ inputs.artifact-tag }} region: ${{ inputs.region }} service: ${{ inputs.service-name }} - From e606a4dc37c449ceccfa36140f6c4ae53bcf1c45 Mon Sep 17 00:00:00 2001 From: Sebastian Melchior <801781+smelchior@users.noreply.github.com> Date: Sat, 8 Nov 2025 21:09:23 +0100 Subject: [PATCH 03/14] feat: add container flag --- .github/workflows/deploy-cloudrun.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/deploy-cloudrun.yaml b/.github/workflows/deploy-cloudrun.yaml index 40460846..3d02360e 100644 --- a/.github/workflows/deploy-cloudrun.yaml +++ b/.github/workflows/deploy-cloudrun.yaml @@ -21,6 +21,10 @@ on: region: required: true type: string + flags: + type: string + container: + type: string workload-identity-provider: required: true type: string @@ -46,6 +50,14 @@ jobs: with: service_account: ${{ inputs.workload-identity-service-account-mail }} workload_identity_provider: ${{ inputs.workload-identity-provider }} + - name: 'Prepare deployment flags field' + id: flags + run: | + FLAGS="${{ inputs.flags }}" + if [ -n "${{ inputs.container }}" ]; then + FLAGS="$FLAGS --container ${{ inputs.container }}" + fi + echo "flags=$FLAGS" >> "$GITHUB_OUTPUT" - name: 'deploy cloudrun job' if: inputs.job-name != '' uses: 'google-github-actions/deploy-cloudrun@v3' @@ -53,6 +65,7 @@ jobs: image: ${{ inputs.registry }}/${{ inputs.artifact-repository }}:${{ inputs.artifact-tag }} region: ${{ inputs.region }} job: ${{ inputs.job-name }} + flags: ${{ steps.flags.outputs.flags }} - name: 'deploy cloudrun service' if: inputs.service-name != '' uses: 'google-github-actions/deploy-cloudrun@v3' @@ -60,3 +73,4 @@ jobs: image: ${{ inputs.registry }}/${{ inputs.artifact-repository }}:${{ inputs.artifact-tag }} region: ${{ inputs.region }} service: ${{ inputs.service-name }} + flags: ${{ steps.flags.outputs.flags }} From 6a4dad100bc1c7824042fb17fb5ad2553398b5f6 Mon Sep 17 00:00:00 2001 From: Sebastian Melchior <801781+smelchior@users.noreply.github.com> Date: Sat, 8 Nov 2025 21:20:30 +0100 Subject: [PATCH 04/14] fix: cloudrun commands --- .github/workflows/deploy-cloudrun.yaml | 47 +++++++++++++++----------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/.github/workflows/deploy-cloudrun.yaml b/.github/workflows/deploy-cloudrun.yaml index 3d02360e..f0281de8 100644 --- a/.github/workflows/deploy-cloudrun.yaml +++ b/.github/workflows/deploy-cloudrun.yaml @@ -50,27 +50,34 @@ jobs: with: service_account: ${{ inputs.workload-identity-service-account-mail }} workload_identity_provider: ${{ inputs.workload-identity-provider }} - - name: 'Prepare deployment flags field' + - name: 'Set up gcloud CLI' + uses: 'google-github-actions/setup-gcloud@v3' + with: + version: '>= 363.0.0' + - name: 'Prepare deployment flags' id: flags run: | - FLAGS="${{ inputs.flags }}" if [ -n "${{ inputs.container }}" ]; then - FLAGS="$FLAGS --container ${{ inputs.container }}" + echo "container_flag=--container ${{ inputs.container }}" >> "$GITHUB_OUTPUT" + else + echo "container_flag=" >> "$GITHUB_OUTPUT" fi - echo "flags=$FLAGS" >> "$GITHUB_OUTPUT" - - name: 'deploy cloudrun job' - if: inputs.job-name != '' - uses: 'google-github-actions/deploy-cloudrun@v3' - with: - image: ${{ inputs.registry }}/${{ inputs.artifact-repository }}:${{ inputs.artifact-tag }} - region: ${{ inputs.region }} - job: ${{ inputs.job-name }} - flags: ${{ steps.flags.outputs.flags }} - - name: 'deploy cloudrun service' - if: inputs.service-name != '' - uses: 'google-github-actions/deploy-cloudrun@v3' - with: - image: ${{ inputs.registry }}/${{ inputs.artifact-repository }}:${{ inputs.artifact-tag }} - region: ${{ inputs.region }} - service: ${{ inputs.service-name }} - flags: ${{ steps.flags.outputs.flags }} + - name: 'deploy cloudrun' + run: | + IMAGE="${{ inputs.registry }}/${{ inputs.artifact-repository }}:${{ inputs.artifact-tag }}" + CONTAINER_FLAG="${{ steps.flags.outputs.container_flag }}" + EXTRA_FLAGS="${{ inputs.flags }}" + + if [ -n "${{ inputs.job-name }}" ]; then + NAME="${{ inputs.job-name }}" + CMD="gcloud run jobs deploy" + else + NAME="${{ inputs.service-name }}" + CMD="gcloud run deploy" + fi + + $CMD "$NAME" \ + ${CONTAINER_FLAG} \ + --image "$IMAGE" \ + --region "${{ inputs.region }}" \ + ${EXTRA_FLAGS} \ No newline at end of file From de7e13d56e91de952eb4062b0d071288e1c68336 Mon Sep 17 00:00:00 2001 From: Sebastian Melchior <801781+smelchior@users.noreply.github.com> Date: Sat, 8 Nov 2025 21:25:49 +0100 Subject: [PATCH 05/14] fix: cloudrun commands --- .github/workflows/deploy-cloudrun.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deploy-cloudrun.yaml b/.github/workflows/deploy-cloudrun.yaml index f0281de8..5c87558a 100644 --- a/.github/workflows/deploy-cloudrun.yaml +++ b/.github/workflows/deploy-cloudrun.yaml @@ -79,5 +79,4 @@ jobs: $CMD "$NAME" \ ${CONTAINER_FLAG} \ --image "$IMAGE" \ - --region "${{ inputs.region }}" \ - ${EXTRA_FLAGS} \ No newline at end of file + --region "${{ inputs.region }}" ${EXTRA_FLAGS} \ No newline at end of file From ab029e3153ad274a0d288d060d54063d766f76fe Mon Sep 17 00:00:00 2001 From: Sebastian Melchior <801781+smelchior@users.noreply.github.com> Date: Sat, 8 Nov 2025 21:31:15 +0100 Subject: [PATCH 06/14] fix: cloudrun commands --- .github/workflows/deploy-cloudrun.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/deploy-cloudrun.yaml b/.github/workflows/deploy-cloudrun.yaml index 5c87558a..17b4af93 100644 --- a/.github/workflows/deploy-cloudrun.yaml +++ b/.github/workflows/deploy-cloudrun.yaml @@ -77,6 +77,4 @@ jobs: fi $CMD "$NAME" \ - ${CONTAINER_FLAG} \ - --image "$IMAGE" \ - --region "${{ inputs.region }}" ${EXTRA_FLAGS} \ No newline at end of file + ${CONTAINER_FLAG} --image="$IMAGE" --region="${{ inputs.region }}" ${EXTRA_FLAGS} \ No newline at end of file From 0c2369ba033322076c2700a78db74aa302ea36a9 Mon Sep 17 00:00:00 2001 From: Sebastian Melchior <801781+smelchior@users.noreply.github.com> Date: Sat, 8 Nov 2025 21:34:48 +0100 Subject: [PATCH 07/14] fix: cloudrun commands --- .github/workflows/deploy-cloudrun.yaml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-cloudrun.yaml b/.github/workflows/deploy-cloudrun.yaml index 17b4af93..aa09eb25 100644 --- a/.github/workflows/deploy-cloudrun.yaml +++ b/.github/workflows/deploy-cloudrun.yaml @@ -69,12 +69,15 @@ jobs: EXTRA_FLAGS="${{ inputs.flags }}" if [ -n "${{ inputs.job-name }}" ]; then - NAME="${{ inputs.job-name }}" - CMD="gcloud run jobs deploy" + gcloud run jobs deploy "${{ inputs.job-name }}" \ + ${CONTAINER_FLAG} \ + --image "$IMAGE" \ + --region "${{ inputs.region }}" \ + ${EXTRA_FLAGS} else - NAME="${{ inputs.service-name }}" - CMD="gcloud run deploy" - fi - - $CMD "$NAME" \ - ${CONTAINER_FLAG} --image="$IMAGE" --region="${{ inputs.region }}" ${EXTRA_FLAGS} \ No newline at end of file + gcloud run deploy "${{ inputs.service-name }}" \ + ${CONTAINER_FLAG} \ + --image "$IMAGE" \ + --region "${{ inputs.region }}" \ + ${EXTRA_FLAGS} + fi \ No newline at end of file From 4887ad574dc0c9801debe24704b3581d7e1eb8d5 Mon Sep 17 00:00:00 2001 From: Sebastian Melchior <801781+smelchior@users.noreply.github.com> Date: Sat, 8 Nov 2025 21:45:52 +0100 Subject: [PATCH 08/14] fix: cloudrun commands --- .github/workflows/deploy-cloudrun.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-cloudrun.yaml b/.github/workflows/deploy-cloudrun.yaml index aa09eb25..8ddb0c95 100644 --- a/.github/workflows/deploy-cloudrun.yaml +++ b/.github/workflows/deploy-cloudrun.yaml @@ -67,17 +67,15 @@ jobs: IMAGE="${{ inputs.registry }}/${{ inputs.artifact-repository }}:${{ inputs.artifact-tag }}" CONTAINER_FLAG="${{ steps.flags.outputs.container_flag }}" EXTRA_FLAGS="${{ inputs.flags }}" - + gcloud set region "${{ inputs.region }}" if [ -n "${{ inputs.job-name }}" ]; then - gcloud run jobs deploy "${{ inputs.job-name }}" \ + gcloud beta run jobs deploy "${{ inputs.job-name }}" \ ${CONTAINER_FLAG} \ --image "$IMAGE" \ - --region "${{ inputs.region }}" \ ${EXTRA_FLAGS} else gcloud run deploy "${{ inputs.service-name }}" \ ${CONTAINER_FLAG} \ --image "$IMAGE" \ - --region "${{ inputs.region }}" \ ${EXTRA_FLAGS} fi \ No newline at end of file From 39572c8a8a3192a682189f0e46363d5fc35917aa Mon Sep 17 00:00:00 2001 From: Sebastian Melchior <801781+smelchior@users.noreply.github.com> Date: Sat, 8 Nov 2025 21:50:00 +0100 Subject: [PATCH 09/14] fix: cloudrun commands --- .github/workflows/deploy-cloudrun.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-cloudrun.yaml b/.github/workflows/deploy-cloudrun.yaml index 8ddb0c95..0b036f51 100644 --- a/.github/workflows/deploy-cloudrun.yaml +++ b/.github/workflows/deploy-cloudrun.yaml @@ -67,7 +67,7 @@ jobs: IMAGE="${{ inputs.registry }}/${{ inputs.artifact-repository }}:${{ inputs.artifact-tag }}" CONTAINER_FLAG="${{ steps.flags.outputs.container_flag }}" EXTRA_FLAGS="${{ inputs.flags }}" - gcloud set region "${{ inputs.region }}" + gcloud config set compute/region ${{ inputs.region }} if [ -n "${{ inputs.job-name }}" ]; then gcloud beta run jobs deploy "${{ inputs.job-name }}" \ ${CONTAINER_FLAG} \ From 94051b377a4adc6bc7776feee1189030f95af8dd Mon Sep 17 00:00:00 2001 From: Sebastian Melchior <801781+smelchior@users.noreply.github.com> Date: Sat, 8 Nov 2025 21:52:41 +0100 Subject: [PATCH 10/14] fix: add beta component to gcloud CLI installation --- .github/workflows/deploy-cloudrun.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-cloudrun.yaml b/.github/workflows/deploy-cloudrun.yaml index 0b036f51..843c895e 100644 --- a/.github/workflows/deploy-cloudrun.yaml +++ b/.github/workflows/deploy-cloudrun.yaml @@ -54,6 +54,7 @@ jobs: uses: 'google-github-actions/setup-gcloud@v3' with: version: '>= 363.0.0' + install_components: 'beta' - name: 'Prepare deployment flags' id: flags run: | From 33c8e6280e0edc92c9e1fc20bb9c80dbe203304a Mon Sep 17 00:00:00 2001 From: Sebastian Melchior <801781+smelchior@users.noreply.github.com> Date: Sat, 8 Nov 2025 21:55:06 +0100 Subject: [PATCH 11/14] fix: cloudrun commands --- .github/workflows/deploy-cloudrun.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-cloudrun.yaml b/.github/workflows/deploy-cloudrun.yaml index 843c895e..4b4c394f 100644 --- a/.github/workflows/deploy-cloudrun.yaml +++ b/.github/workflows/deploy-cloudrun.yaml @@ -68,7 +68,7 @@ jobs: IMAGE="${{ inputs.registry }}/${{ inputs.artifact-repository }}:${{ inputs.artifact-tag }}" CONTAINER_FLAG="${{ steps.flags.outputs.container_flag }}" EXTRA_FLAGS="${{ inputs.flags }}" - gcloud config set compute/region ${{ inputs.region }} + gcloud config set run/region ${{ inputs.region }} if [ -n "${{ inputs.job-name }}" ]; then gcloud beta run jobs deploy "${{ inputs.job-name }}" \ ${CONTAINER_FLAG} \ From 64bdf69ed18aad78db8759daf4da7d95a810b261 Mon Sep 17 00:00:00 2001 From: Sebastian Melchior <801781+smelchior@users.noreply.github.com> Date: Mon, 10 Nov 2025 19:50:55 +0100 Subject: [PATCH 12/14] fix: review comments --- .github/workflows/deploy-cloudrun.yaml | 14 +++++++++++++- README.md | 10 ++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-cloudrun.yaml b/.github/workflows/deploy-cloudrun.yaml index 4b4c394f..1ca6351c 100644 --- a/.github/workflows/deploy-cloudrun.yaml +++ b/.github/workflows/deploy-cloudrun.yaml @@ -4,31 +4,41 @@ on: workflow_call: inputs: job-name: + description: 'Name of the Cloud Run job to deploy' required: false type: string service-name: + description: 'Name of the Cloud Run service to deploy' required: false type: string registry: + description: 'Container registry URL (e.g., gcr.io, europe-west3-docker.pkg.dev)' required: true type: string artifact-repository: + description: 'Repository name in the artifact registry' required: true type: string artifact-tag: + description: 'Tag of the container image to deploy' required: true type: string region: + description: 'GCP region where the Cloud Run resource will be deployed' required: true type: string flags: + description: 'Additional flags to pass to the gcloud deploy command' type: string container: + description: 'Container name for multi-container deployments' type: string workload-identity-provider: + description: 'Workload Identity Provider for authentication' required: true type: string workload-identity-service-account-mail: + description: 'Service account email for Workload Identity' required: true type: string jobs: @@ -63,12 +73,14 @@ jobs: else echo "container_flag=" >> "$GITHUB_OUTPUT" fi + # we cannot use google-github-actions/deploy-cloudrun here due to: + # https://github.com/google-github-actions/deploy-cloudrun/issues/558 - name: 'deploy cloudrun' run: | IMAGE="${{ inputs.registry }}/${{ inputs.artifact-repository }}:${{ inputs.artifact-tag }}" CONTAINER_FLAG="${{ steps.flags.outputs.container_flag }}" EXTRA_FLAGS="${{ inputs.flags }}" - gcloud config set run/region ${{ inputs.region }} + gcloud config set run/region "${{ inputs.region }}" if [ -n "${{ inputs.job-name }}" ]; then gcloud beta run jobs deploy "${{ inputs.job-name }}" \ ${CONTAINER_FLAG} \ diff --git a/README.md b/README.md index b33a9d3b..24c9ad22 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,16 @@ Template: When a GH commit URL is included in commit message, link the commit from said comment. +### Cloudrun Deployment + +Template: + + +Deploy images to google cloudrun services or jobs. + +See [deploy-cloudrun.yaml](./.github/workflows/deploy-cloudrun.yaml) for details. + + ## Deploying new versions of actions and workflows You might have noticed that main branch in this repository is called From 80e6d85fd86b05353d6c1297f3096aaa013edb53 Mon Sep 17 00:00:00 2001 From: Sebastian Melchior <801781+smelchior@users.noreply.github.com> Date: Fri, 14 Nov 2025 06:56:45 +0100 Subject: [PATCH 13/14] chore: fix review comments --- .github/workflows/deploy-cloudrun.yaml | 34 ++++++++++++-------------- README.md | 5 +--- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/.github/workflows/deploy-cloudrun.yaml b/.github/workflows/deploy-cloudrun.yaml index 1ca6351c..5108a32a 100644 --- a/.github/workflows/deploy-cloudrun.yaml +++ b/.github/workflows/deploy-cloudrun.yaml @@ -4,11 +4,11 @@ on: workflow_call: inputs: job-name: - description: 'Name of the Cloud Run job to deploy' + description: 'Cloud Run Job name (at least one of job-name or service-name required)' required: false type: string service-name: - description: 'Name of the Cloud Run service to deploy' + description: 'Cloud Run Service name (at least one of job-name or service-name required)' required: false type: string registry: @@ -16,15 +16,15 @@ on: required: true type: string artifact-repository: - description: 'Repository name in the artifact registry' + description: 'Image repository name without registry prefix (e.g., my-image)' required: true type: string artifact-tag: - description: 'Tag of the container image to deploy' + description: 'Image tag of the container image to deploy' required: true type: string region: - description: 'GCP region where the Cloud Run resource will be deployed' + description: 'GCP region for Cloud Run deployment (e.g., europe-west3)' required: true type: string flags: @@ -34,11 +34,11 @@ on: description: 'Container name for multi-container deployments' type: string workload-identity-provider: - description: 'Workload Identity Provider for authentication' + description: 'GCP Workload Identity Provider resource name' required: true type: string workload-identity-service-account-mail: - description: 'Service account email for Workload Identity' + description: 'GCP service account email for workload identity OIDC authentication' required: true type: string jobs: @@ -53,7 +53,7 @@ jobs: - name: Validate inputs run: | if [[ -z "${{ inputs.job-name }}" && -z "${{ inputs.service-name }}" ]]; then - echo "Error: at least one of 'job-name' or 'service-name' must be provided" + echo "::error::At least one of 'job-name' or 'service-name' must be provided" exit 1 fi - uses: 'google-github-actions/auth@v3' @@ -63,22 +63,20 @@ jobs: - name: 'Set up gcloud CLI' uses: 'google-github-actions/setup-gcloud@v3' with: - version: '>= 363.0.0' install_components: 'beta' - - name: 'Prepare deployment flags' - id: flags - run: | - if [ -n "${{ inputs.container }}" ]; then - echo "container_flag=--container ${{ inputs.container }}" >> "$GITHUB_OUTPUT" - else - echo "container_flag=" >> "$GITHUB_OUTPUT" - fi + # we cannot use google-github-actions/deploy-cloudrun here due to: # https://github.com/google-github-actions/deploy-cloudrun/issues/558 - name: 'deploy cloudrun' + env: + CONTAINER: ${{ inputs.container }} run: | + if [ -n "$CONTAINER" ]; then + CONTAINER_FLAG="--container $CONTAINER" + else + CONTAINER_FLAG="" + fi IMAGE="${{ inputs.registry }}/${{ inputs.artifact-repository }}:${{ inputs.artifact-tag }}" - CONTAINER_FLAG="${{ steps.flags.outputs.container_flag }}" EXTRA_FLAGS="${{ inputs.flags }}" gcloud config set run/region "${{ inputs.region }}" if [ -n "${{ inputs.job-name }}" ]; then diff --git a/README.md b/README.md index 24c9ad22..a5d27606 100644 --- a/README.md +++ b/README.md @@ -175,10 +175,7 @@ When a GH commit URL is included in commit message, link the commit from said co ### Cloudrun Deployment -Template: - - -Deploy images to google cloudrun services or jobs. +Deploy images to Google Cloud Run services or jobs. See [deploy-cloudrun.yaml](./.github/workflows/deploy-cloudrun.yaml) for details. From ac94dcf5a71eb7ff2b36f11ee8d43abbf72897ae Mon Sep 17 00:00:00 2001 From: Sebastian Melchior <801781+smelchior@users.noreply.github.com> Date: Fri, 14 Nov 2025 17:22:01 +0100 Subject: [PATCH 14/14] Apply suggestion from @coderabbitai[bot] Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a5d27606..2a662826 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ Template: When a GH commit URL is included in commit message, link the commit from said comment. -### Cloudrun Deployment +### Cloud Run Deployment Deploy images to Google Cloud Run services or jobs.