Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
paths:
'**/*.yml':
ignore:
# https://github.com/rhysd/actionlint/issues/559
- 'invalid runner name "node24"'
8 changes: 1 addition & 7 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@ name: 'Cleanup'

on:
pull_request:
branches:
- 'main'
- 'release/**'
paths:
- '.github/workflows/cleanup.yml'
push:
branches:
- 'main'
- 'release/**'
paths:
- '.github/workflows/cleanup.yml'
schedule:
Expand All @@ -35,7 +29,7 @@ jobs:
steps:
- uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # ratchet:actions/checkout@v4

- uses: 'google-github-actions/auth@v2' # ratchet:exclude
- uses: 'google-github-actions/auth@v3' # ratchet:exclude
with:
workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}'
service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}'
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

- run: 'npm ci && npm run build'

- uses: 'google-github-actions/auth@v2' # ratchet:exclude
- uses: 'google-github-actions/auth@v3' # ratchet:exclude
with:
workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}'
service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}'
Expand All @@ -69,7 +69,6 @@ jobs:
env_vars: |-
FOO=bar
ZIP=zap\,with|separators\,and&stuff
env_vars_file: './tests/fixtures/env_vars.txt'
secrets: |-
MY_SECRET=${{ vars.SECRET_NAME }}:latest
MY_SECOND_SECRET=${{ vars.SECRET_NAME }}:1
Expand All @@ -87,9 +86,7 @@ jobs:
ENV: |-
{
"FOO": "bar",
"ZIP": "zap,with|separators,and&stuff",
"TEXT_FOO": "bar",
"TEXT_ZIP": "zap,with|separators,and&stuff"
"ZIP": "zap,with|separators,and&stuff"
}
SECRET_ENV: |-
{
Expand Down Expand Up @@ -173,7 +170,7 @@ jobs:

- run: 'npm ci && npm run build'

- uses: 'google-github-actions/auth@v2' # ratchet:exclude
- uses: 'google-github-actions/auth@v3' # ratchet:exclude
with:
workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}'
service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}'
Expand Down Expand Up @@ -246,7 +243,7 @@ jobs:

- run: 'npm ci && npm run build'

- uses: 'google-github-actions/auth@v2' # ratchet:exclude
- uses: 'google-github-actions/auth@v3' # ratchet:exclude
with:
workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}'
service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}'
Expand All @@ -260,7 +257,6 @@ jobs:
env_vars: |-
FOO=bar
ZIP=zap\,with|separators\,and&stuff
env_vars_file: './tests/fixtures/env_vars.txt'
secrets: |-
MY_SECRET=${{ vars.SECRET_NAME }}:latest
MY_SECOND_SECRET=${{ vars.SECRET_NAME }}:1
Expand All @@ -278,9 +274,7 @@ jobs:
ENV: |-
{
"FOO": "bar",
"ZIP": "zap,with|separators,and&stuff",
"TEXT_FOO": "bar",
"TEXT_ZIP": "zap,with|separators,and&stuff"
"ZIP": "zap,with|separators,and&stuff"
}
SECRET_ENV: |-
{
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ support](https://cloud.google.com/support).**
the secrets being requested. See [Authorization](#authorization) for more
information.

- This action runs using Node 20. If you are using self-hosted GitHub Actions
- This action runs using Node 24. If you are using self-hosted GitHub Actions
runners, you must use a [runner
version](https://github.com/actions/virtual-environments) that supports this
version or newer.
Expand All @@ -36,13 +36,13 @@ jobs:
steps:
- uses: 'actions/checkout@v4'

- uses: 'google-github-actions/auth@v2'
- uses: 'google-github-actions/auth@v3'
with:
workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
service_account: 'my-service-account@my-project.iam.gserviceaccount.com'

- id: 'deploy'
uses: 'google-github-actions/deploy-cloudrun@v2'
uses: 'google-github-actions/deploy-cloudrun@v3'
with:
service: 'hello-cloud-run'
image: 'us-docker.pkg.dev/cloudrun/container/hello:latest'
Expand Down Expand Up @@ -358,12 +358,12 @@ jobs:

# ...

- uses: 'google-github-actions/auth@v2'
- uses: 'google-github-actions/auth@v3'
with:
workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
service_account: 'my-service-account@my-project.iam.gserviceaccount.com'

- uses: 'google-github-actions/deploy-cloudrun@v2'
- uses: 'google-github-actions/deploy-cloudrun@v3'
with:
image: 'us-docker.pkg.dev/cloudrun/container/hello:latest'
service: 'hello-cloud-run'
Expand All @@ -382,7 +382,7 @@ jobs:
steps:
# ...

- uses: 'google-github-actions/deploy-cloudrun@v2'
- uses: 'google-github-actions/deploy-cloudrun@v3'
with:
image: 'us-docker.pkg.dev/cloudrun/container/hello:latest'
service: 'hello-cloud-run'
Expand Down
95 changes: 47 additions & 48 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ inputs:
`\\n`) unless quoted. Any leading or trailing whitespace is trimmed unless
values are quoted.

env_vars: |-
FRUIT=apple
SENTENCE=" this will retain leading and trailing spaces "
```yaml
env_vars: |-
FRUIT=apple
SENTENCE=" this will retain leading and trailing spaces "
```

This value will only be set if the input is a non-empty value. If a
non-empty value is given, the field values will be overwritten (not
Expand All @@ -86,27 +88,6 @@ inputs:
`env_vars` will take precedence over the keys in `env_vars_file`.
required: false

env_vars_file:
description: |-
Path to a file on disk, relative to the workspace, that defines
environment variables. The file can be newline-separated KEY=VALUE pairs,
JSON, or YAML format. If both `env_vars` and `env_vars_file` are
specified, the keys in env_vars will take precedence over the keys in
env_vars_file.

NAME=person
EMAILS=foo@bar.com\,zip@zap.com

When specified as KEY=VALUE pairs, the same escaping rules apply as
described in `env_vars`. You do not have to escape YAML or JSON.

If both `env_vars` and `env_vars_file` are specified, the keys in
`env_vars` will take precedence over the keys in `env_vars_file`.

**⚠️ DEPRECATION NOTICE:** This input is deprecated and will be removed in
the next major version release.
required: false

env_vars_update_strategy:
description: |-
Controls how the environment variables are set on the Cloud Run service.
Expand All @@ -128,13 +109,15 @@ inputs:
volumes. Keys starting with a forward slash '/' are mount paths. All other
keys correspond to environment variables:

with:
secrets: |-
# As an environment variable:
KEY1=secret-key-1:latest
```yaml
with:
secrets: |-
# As an environment variable:
KEY1=secret-key-1:latest

# As a volume mount:
/secrets/api/key=secret-key-2:latest
# As a volume mount:
/secrets/api/key=secret-key-2:latest
```

This value will only be set if the input is a non-empty value. If a
non-empty value is given, the field values will be overwritten (not
Expand All @@ -159,9 +142,11 @@ inputs:
unless quoted. Any leading or trailing whitespace is trimmed unless values
are quoted.

labels: |-
labela=my-label
labelb=my-other-label
```yaml
labels: |-
labela=my-label
labelb=my-other-label
```

This value will only be set if the input is a non-empty value. If a
non-empty value is given, the field values will be overwritten (not
Expand Down Expand Up @@ -204,14 +189,18 @@ inputs:
`gcloud run deploy`. For Cloud Run jobs, this command will be `gcloud jobs
deploy`.

with:
flags: '--add-cloudsql-instances=...'
```yaml
with:
flags: '--add-cloudsql-instances=...'
```

Flags that include other flags must quote the _entire_ outer flag value. For
example, to pass `--args=-X=123`:

with:
flags: '--add-cloudsql-instances=... "--args=-X=123"'
```yaml
with:
flags: '--add-cloudsql-instances=... "--args=-X=123"'
```

See the [complete list of
flags](https://cloud.google.com/sdk/gcloud/reference/run/deploy#FLAGS) for
Expand Down Expand Up @@ -240,13 +229,17 @@ inputs:
description: |-
Comma-separated list of revision traffic assignments.

with:
revision_traffic: 'my-revision=10' # percentage
```yaml
with:
revision_traffic: 'my-revision=10' # percentage
```

To update traffic to the latest revision, use the special tag "LATEST":

with:
revision_traffic: 'LATEST=100'
```yaml
with:
revision_traffic: 'LATEST=100'
```

This is mutually-exclusive with `tag_traffic`. This option only applies
to services.
Expand All @@ -256,8 +249,10 @@ inputs:
description: |-
Comma-separated list of tag traffic assignments.

with:
tag_traffic: 'my-tag=10' # percentage
```yaml
with:
tag_traffic: 'my-tag=10' # percentage
```

This is mutually-exclusive with `revision_traffic`. This option only
applies to services.
Expand All @@ -270,14 +265,18 @@ inputs:
features that are not exposed via this GitHub Action. This flag only
applies when `revision_traffic` or `tag_traffic` is set.

with:
traffic_flags: '--set-tags=...'
```yaml
with:
traffic_flags: '--set-tags=...'
```

Flags that include other flags must quote the _entire_ outer flag value. For
example, to pass `--args=-X=123`:

with:
flags: '--set-tags=... "--args=-X=123"'
```yaml
with:
flags: '--set-tags=... "--args=-X=123"'
```

See the [complete list of
flags](https://cloud.google.com/sdk/gcloud/reference/run/services/update#FLAGS)
Expand Down Expand Up @@ -321,5 +320,5 @@ branding:
color: 'blue'

runs:
using: 'node20'
using: 'node24'
main: 'dist/main/index.js'
Loading
Loading