Skip to content

thoughtgears/action-set-secretmanager-secret

Repository files navigation

Description

Sets Google Secret manager secrets in the environment.

Inputs

name description required default
project_id

The project to create or update the secret in.

true ""
secrets

A comma separated list of <key=value> pairs to set as secrets.

true ""

Outputs

name description
updated_secrets

The list of updated secrets.

Runs

This action is a node20 action.

Example usage

name: Set Google Secret Manager Secrets
on: push

env:
  project_id: ${{ secrets.GCP_PROJECT_ID }}

jobs:
  set-secrets:
    runs-on: ubuntu-latest

    permissions:
      contents: read
      id-token: write

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Authenticate to Google Cloud
        uses: google-github-actions/auth@v2
        with:
          project_id: my-project
          workload_identity_provider: projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider
          service_account: my-service-account@my-project.iam.gserviceaccount.com

      - name: Set secrets
        uses: thoughtgears/set-secret-manager-secrets@v1
        with:
          project_id: my-project
          secrets: MY_SECRET=my-secret-value,ANOTHER_SECRET=another-secret-value

About

A action to set secrets in the secret manager in Google

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •