cloud-run-button

Let anyone deploy your GitHub repos to Google Cloud Run with a single click

  • 所有者: GoogleCloudPlatform/cloud-run-button
  • 平台:
  • 許可證: Apache License 2.0
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Cloud Run Button

If you have a public repository, you can add this button to your README.md and
let anyone deploy your application to Google Cloud Run with a single
click.

Try it out with a "hello, world" Go application (source):

Run on Google
Cloud

Demo

Cloud Run Button Demo

Add the Cloud Run Button to Your Repo's README

  1. Copy & paste this markdown:

    [![Run on Google Cloud](https://deploy.cloud.run/button.svg)](https://deploy.cloud.run)
    
  2. If the repo contains a Dockerfile, it will be built using the docker build command. Otherwise, the CNCF Buildpacks (i.e. the pack build command) will be used to build the repo (buildpack samples).

Customizing source repository parameters

  • When no parameters are passed, the referer is used to detect the git repo and branch
  • To specify a git repo, add a git_repo=URL query parameter
  • To specify a git branch, add a revision=BRANCH_NAME query parameter.
  • To run the build in a subdirectory of the repo, add a dir=SUBDIR query parameter.

Customizing deployment parameters

If you include an app.json at the root of your repository, it allows you
customize the experience such as defining an alternative service name, or
prompting for additional environment variables.

For example:

{
  "name": "foo-app",
  "env": {
      "BACKGROUND_COLOR": {
          "description": "specify a css color",
          "value": "#fefefe",
          "required": false
      },
      "TITLE": {
          "description": "title for your site"
      }
  }
}

Reference:

  • name: (optional, default: repo name, or sub-directory name if specified)
    Name of the Cloud Run service and the built container image. Not validated for
    naming restrictions.
  • env: (optional) Prompt user for environment variables.
    • description: (optional) short explanation of what the environment
      variable does, keep this short to make sure it fits into a line.
    • value: (optional) default value for the variable, should be a string.
    • required, (optional, default: true) indicates if they user must provide
      a value for this variable.

Notes

  • Disclaimer: This is not an officially supported Google product.
  • See LICENSE for the licensing information.
  • See Contribution Guidelines on how to contribute.

主要指標

概覽
名稱與所有者GoogleCloudPlatform/cloud-run-button
主編程語言Go
編程語言Dockerfile (語言數: 6)
平台
許可證Apache License 2.0
所有者活动
創建於2019-05-14 21:51:15
推送於2025-04-16 23:30:30
最后一次提交2025-04-14 09:14:10
發布數0
用户参与
星數536
關注者數32
派生數97
提交數137
已啟用問題?
問題數164
打開的問題數46
拉請求數116
打開的拉請求數2
關閉的拉請求數24
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?