The secrets param format doesn't seem to match the documentation?
Expected behavior
Expected this format to work:
secrets: |-
# As an environment variable:
KEY1=secret-key-1:latest
But it seems that only the old format works currently?
secrets: |-
KEY1=projects/p/secrets/s/versions/v
Observed behavior
Error: google-github-actions/deploy-cloud-functions failed with: failed to parse secret reference "ASTRAL_LOCATION:latest": unknown format. Secrets should be of the format "projects/p/secrets/s/versions/v".
Action YAML
name: Deploy
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
concurrency: "prod"
steps:
- uses: 'actions/checkout@v4.1.7'
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v2.1.5'
with:
workload_identity_provider: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ vars.GCP_SERVICE_ACCOUNT }}
- uses: actions/setup-python@v5.2.0
with:
python-version: 3.11
- name: Install poetry
uses: abatilo/actions-poetry@v3.0.0
- name: Install dependencies
run: poetry install
- name: Test
run: poetry run pytest -v
- name: Generate Requirements
run: poetry export --output=requirements.txt
- id: 'deploy'
uses: 'google-github-actions/deploy-cloud-functions@v3.0.5'
with:
name: ${{ vars.GCP_CLOUD_FUNCTION_NAME }}
runtime: 'python311'
environment: GEN_2
max_instance_count: 2
entry_point: "update"
# TODO put these all in github or all in gcp
environment_variables: |-
DEVICE_ID=${{ vars.DEVICE_ID}}
secrets: |-
ASTRAL_LOCATION=ASTRAL_LOCATION:latest
SUREPY_AUTH_TOKEN=SUREPY_AUTH_TOKEN:latest
- name: Trigger deployed function
run:
curl ${{ steps.deploy.outputs.url }} --fail-with-body
TL;DR
The
secrets
param format doesn't seem to match the documentation?Expected behavior
Expected this format to work:
But it seems that only the old format works currently?
Observed behavior
Error: google-github-actions/deploy-cloud-functions failed with: failed to parse secret reference "ASTRAL_LOCATION:latest": unknown format. Secrets should be of the format "projects/p/secrets/s/versions/v".
Action YAML
Log output
Additional information
No response