-
Notifications
You must be signed in to change notification settings - Fork 70
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
TL;DR
- Deployed a new cloud function via this action without environment variables.
- Updated the action to include environment variables
- Deployed the cloud function via this action
- None of the environment variables were set
- Deleted the cloud function
- Redeployed via this action with no changes
- Environment variables were set
- Updated one environment variable
- Redeployed via this action
- Environment variable was not updated
The documentation says "If a non-empty value is given, the field values will be overwritten (not merged)" but this does not appear to be happening. I am 90% sure this was functioning in a different project I was working on a week or two ago but I am not sure.
Expected behavior
When changing the contents of environment_variables
in this action, I expect the environment variables used by the cloud function to be updated to match the contents of the environment_variables
.
Observed behavior
The cloud function environment variables were not set.
Action YAML
name: "Deploy Cloud Fn"
on:
workflow_dispatch:
inputs:
yml-config-path:
required: true
type: string
workflow_call:
inputs:
yml-config-path:
required: true
type: string
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Load environment from YAML
uses: doughepi/yaml-env-action@v1.0.0
with:
files: ${{ inputs.yml-config-path }}
- id: auth
uses: google-github-actions/auth@v2
with:
project_id: ${{ env.GCP_PROJECT_ID }}
workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }}
- id: "deploy"
uses: "google-github-actions/deploy-cloud-functions@v3"
timeout-minutes: 10
with:
runtime: "nodejs22"
project_id: ${{ env.GCP_PROJECT_ID }}
region: ${{ env.GCP_REGION }}
service_account: ${{ env.GCP_SERVICE_ACCOUNT }}
name: ${{ env.GCP_FN_NAME }}
environment_variables: ${{ env.GCP_ENV_VARS }}
secrets: ${{ env.GCP_SECRETS }}
max_instance_count: ${{ env.GCP_MAX_INSTANCE_COUNT }}
service_timeout: ${{ env.GCP_SERVICE_TIMEOUT }}
memory: ${{ env.GCP_GCS_FN_MEMORY }}
Log output
No response
Additional information
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working