Skip to content

Commit b15c729

Browse files
authored
Drop googleapis dependency for a lightweight functions client (#209)
* Drop googleapis dependency for a lightweight functions client * Review comments
1 parent 58f3b55 commit b15c729

16 files changed

+1713
-486206
lines changed

.github/workflows/unit.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
pull_request:
88
branches:
99
- 'main'
10+
workflow_dispatch:
1011

1112
concurrency:
1213
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
@@ -17,6 +18,7 @@ jobs:
1718
name: 'unit'
1819
runs-on: '${{ matrix.os }}'
1920
strategy:
21+
fail-fast: false
2022
matrix:
2123
os:
2224
- 'ubuntu-latest'
@@ -41,7 +43,6 @@ jobs:
4143

4244
- name: 'npm test'
4345
env:
46+
DEPLOY_CF_PROJECT_ID: '${{ secrets.DEPLOY_CF_PROJECT_ID }}'
4447
DEPLOY_CF_SA_KEY_JSON: '${{ secrets.DEPLOY_CF_SA_KEY_JSON }}'
45-
GCLOUD_PROJECT: '${{ secrets.DEPLOY_CF_PROJECT_ID }}'
46-
DEPLOY_CF_EVENT_PUBSUB_TOPIC: '${{ secrets.DEPLOY_CF_EVENT_PUBSUB_TOPIC }}'
4748
run: 'npm run test'

action.yaml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ author: Google LLC
2121
inputs:
2222
credentials:
2323
description: |-
24-
Optional service account key to use for authentication to GCP. This should be the JSON
25-
formatted private key which can be exported from the Cloud Console. The
26-
value can be raw or base64-encoded.
24+
(DEPRECATED) Optional service account key to use for authentication to
25+
GCP. This should be the JSON formatted private key which can be exported
26+
from the Cloud Console. The value can be raw or base64-encoded.
2727
required: false
2828

2929
name:
@@ -38,17 +38,19 @@ inputs:
3838

3939
project_id:
4040
description: |-
41-
Project to deploy the function in.
41+
ID of the project in which to deploy the Cloud Function.
4242
required: false
4343

4444
region:
4545
description: |-
4646
Region to deploy the function in. Defaults to us-central1, if not specified.
47+
default: 'us-central1'
4748
required: false
4849

4950
source_dir:
5051
description: |-
5152
Path to function deployment directory within the source repo.
53+
default: './'
5254
required: false
5355

5456
env_vars:
@@ -129,12 +131,26 @@ inputs:
129131
deploy_timeout:
130132
description: |-
131133
The function deployment timeout in seconds.
134+
default: 300
132135
required: false
133136

134137
outputs:
135138
url:
136139
description: The URL of your Cloud Function. Only available with HTTP Trigger.
140+
id:
141+
description: |-
142+
Full resource name of the Cloud Function, of the format
143+
'projects/p/locations/l/functions/f'.
144+
status:
145+
description: |-
146+
Status of the Cloud Function deployment.
147+
version:
148+
description: |-
149+
Version of the Cloud Function deployment.
150+
runtime:
151+
description: |-
152+
Runtime of the Cloud Function deployment.
137153
138154
runs:
139-
using: "node12"
140-
main: "dist/index.js"
155+
using: 'node12'
156+
main: 'dist/index.js'

0 commit comments

Comments
 (0)