initial Add test app and tests add license Update ReadMe and runner Fix lint errors Missed fixes Update tests to run integration on PR rename pkg -> setupGloudSDK Update ts congig Remove project id requirement Update gcloud set project id func Add unit tests for pkg Add set project to action rebuild Fix gcloud typo lint pkg and update project id dependency Update tmp JSON writer Add cleanup to integration tests Update get input validation fix json string Fix test order and version name add project id to test remove clean up step Update project url Add no promote flag test stderr vs stdout Update pkg build refactor setup-gcloud clean up Fix tool command for isAuthenticated debugging test command Fix isInstalled method Clean up |
||
|---|---|---|
| .. | ||
| dist | ||
| src | ||
| test | ||
| .eslintrc.js | ||
| .gitignore | ||
| .prettierrc.js | ||
| action.yml | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
appengine-deploy
This action deploys your source code to App Engine and makes the URL available to later build steps via outputs. This allows you to parameterize your App Engine deployments.
Note This action will install gcloud in the background if not using in with
the setup-gcloud action.
Prerequisites
This action requires Google Cloud credentials that are authorized to deploy an App Engine Application. See the Authorization section below for more information.
Usage
steps:
- id: deploy
uses: GoogleCloudPlatform/github-actions/appengine-deploy@master
with:
credentials: ${{ secrets.gcp_credentials }}
# Example of using the output
- id: test
run: curl "${{ steps.deploy.outputs.url }}"
Inputs
-
project_id: (Optional) ID of the Google Cloud project. If provided, this will override the project configured by gcloud. -
deliverables: (Optional) The yaml files for the services or configurations you want to deploy. If not given, defaults to app.yaml in the current directory. If that is not found, attempts to automatically generate necessary configuration files (such as app.yaml) in the current directory. -
image-url: (Optional) Deploy with a specific container image. The image url must be from one of the valid GCR hostnames (example,gcr.io/). -
version: (Optional) The version of the app that will be created or replaced by this deployment. If you do not specify a version, one will be generated for you. -
promote: (Optional) Promote the deployed version to receive all traffic.
app.yaml customizations
Other application configurations can be customized through the app.yaml, ie the service name. See app.yaml Configuration File for more information.
Outputs
url: The URL of your App Engine Application.
Authorization
There are a few ways to authenticate this action. The caller must have permissions to access the secrets being requested.
Roles needed:
- Storage Admin (
roles/compute.storageAdmin):to upload files - Cloud Build Editor (
cloudbuild.builds.editor): to build the application - App Engine roles:
- Deployer (
roles/appengine.deployer): Can deploy but can not promote - Admin (
roles/appengine.appAdmin): Can manage all App Engine resources (not recommended)
- Deployer (
Note: An owner will be needed to create the App Engine application
Used with setup-gcloud
You can provide credentials using the setup-gcloud action,
however you must provide your Project ID to the appeninge-deploy action:
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
export_default_credentials: true
- uses: GoogleCloudPlatform/github-actions/appengine-deploy@master
with:
project_id: ${{ secrets.project_id }}
Via Credentials
You can provide Google Cloud Service Account JSON directly to the action
by specifying the credentials input. First, create a GitHub
Secret that contains the JSON content, then import it into the
action:
- id: secrets
uses: GoogleCloudPlatform/github-actions/appengine-deploy@master
with:
credentials: ${{ secrets.gcp_credentials }}
Via Application Default Credentials
If you are hosting your own runners, and those runners are on Google Cloud, you can leverage the Application Default Credentials of the instance. This will authenticate requests as the service account attached to the instance. This only works using a custom runner hosted on GCP.
- id: secrets
uses: GoogleCloudPlatform/github-actions/appengine-deploy@master
The action will automatically detect and use the Application Default Credentials.