Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jashparekh/cloud-functions-action
This Github action can be used to deploy code to Cloud Functions
https://github.com/jashparekh/cloud-functions-action
cloud-functions github-actions google google-cloud-function google-cloud-functions google-cloud-platform
Last synced: 11 days ago
JSON representation
This Github action can be used to deploy code to Cloud Functions
- Host: GitHub
- URL: https://github.com/jashparekh/cloud-functions-action
- Owner: jashparekh
- License: mit
- Created: 2021-09-12T19:49:55.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-07T10:00:29.000Z (over 1 year ago)
- Last Synced: 2024-10-15T17:16:58.259Z (23 days ago)
- Topics: cloud-functions, github-actions, google, google-cloud-function, google-cloud-functions, google-cloud-platform
- Language: Python
- Homepage: https://github.com/marketplace/actions/google-cloud-function-deploy-code-action-for-github-action
- Size: 79.1 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[![Actions Status](https://github.com/jashparekh/cloud-functions-action/workflows/Lint/badge.svg?branch=main)](https://github.com/jashparekh/cloud-functions-action/actions)
[![Actions Status](https://github.com/jashparekh/cloud-functions-action/workflows/Unit%20Tests/badge.svg?branch=main)](https://github.com/jashparekh/cloud-functions-action/actions)
[![Actions Status](https://github.com/jashparekh/cloud-functions-action/workflows/Integration%20Test/badge.svg?branch=main)](https://github.com/jashparekh/cloud-functions-action/actions)
![Version](https://img.shields.io/static/v3.svg?label=Version&message=v1&color=lightgrey&?link=http://left&link=https://github.com/jashparekh/cloud-functions-action/tree/v1)# Cloud Function Github Action
This Github action can be used to deploy code to Cloud Functions.
### Simple
```yaml
name: "Deploy code to Cloud Function"
on:
pull_request: {}
push:
branches: ["main"]jobs:
deploy_schemas:
runs-on: ubuntu-latest
name: Deploy code to Cloud Function
steps:
# To use this repository's private action,
# you must check out the repository
- name: Checkout
uses: actions/[email protected]
- name: Deploy code to Cloud Function
uses: jashparekh/cloud-functions-action@v1
env:
gcp_project: "gcp-us-project"
gcp_region: "us-central1"
cloud_function_name: "function-1"
cloud_function_directory: "directory/function-code"
credentials: ${{ secrets.GCP_SERVICE_ACCOUNT }}
```## Configuration
### Required
### `gcp_project` (required, string)
The name of the GCP project you want to deploy.
Example: `gcp-us-project`
### `gcp_region` (required, string)
GCP region where the cloud function is hosted.
Example: `us-central1`
### `cloud_function_name` (required, string)
Name of the cloud function in GCP.
Example: `function-1`
### `cloud_function_directory` (required, string)
The directory in your repository where are you storing the code files for cloud function.
Example: `directory/function-code`
### `credentials` (required, string)
Google Service Account with permission to create objects in the specified project. Can be stored as a [repository secret](https://docs.github.com/en/actions/reference/encrypted-secrets)
## Contributing
See the [Contributing Guide](CONTRIBUTING.md) for additional information.
To execute tests locally (requires that `docker` and `docker-compose` are installed):
```bash
docker-compose run test
```## Credits
This Github Action was originally written by [Jash Parekh](https://github.com/jashparekh).