Skip to content

Commit c2e3bc3

Browse files
authored
docs: update readme to clarify checkout step and env_vars usage (#40)
It seems to not be uncommon for people to forget the checkout step when using this action, so now it is included in each of the code examples. `env_vars` clears all existing variables regardless of whether it's passed or not. Simply making it _Optional_ doesn't necessarily highlight this, so it has been made more clear.
1 parent 8c34cc5 commit c2e3bc3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Cloud Function. See the Authorization section below for more information.
3131

3232
```yaml
3333
steps:
34+
- uses: actions/checkout@v2
3435
- id: deploy
3536
uses: google-github-actions/deploy-cloud-functions@main
3637
with:
@@ -62,7 +63,7 @@ steps:
6263

6364
- `env_vars`: (Optional) List of key-value pairs to set as environment variables in the format:
6465
`KEY1=VALUE1,KEY2=VALUE2`. All existing environment variables will be
65-
removed first.
66+
removed, even if this parameter is not passed.
6667

6768
- `source_dir`: (Optional) Source directory for the function. Defaults to current directory.
6869

@@ -120,6 +121,7 @@ You can provide credentials using the [setup-gcloud][setup-gcloud] action:
120121
with:
121122
service_account_key: ${{ secrets.GCP_SA_KEY }}
122123
export_default_credentials: true
124+
- uses: actions/checkout@v2
123125
- id: Deploy
124126
uses: google-github-actions/deploy-cloud-functions@main
125127
with:
@@ -135,6 +137,7 @@ Secret][gh-secret] that contains the JSON content, then import it into the
135137
action:
136138

137139
```yaml
140+
- uses: actions/checkout@v2
138141
- id: Deploy
139142
uses: google-github-actions/deploy-cloud-functions@main
140143
with:
@@ -151,6 +154,7 @@ authenticate requests as the service account attached to the instance. **This
151154
only works using a custom runner hosted on GCP.**
152155

153156
```yaml
157+
- uses: actions/checkout@v2
154158
- id: Deploy
155159
uses: google-github-actions/deploy-cloud-functions@main
156160
with:

0 commit comments

Comments
 (0)