Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nearform-actions/github-action-gcp-secrets
GitHub action to create or update GCP secrets only if required
https://github.com/nearform-actions/github-action-gcp-secrets
gcp github-actions google-cloud
Last synced: about 2 months ago
JSON representation
GitHub action to create or update GCP secrets only if required
- Host: GitHub
- URL: https://github.com/nearform-actions/github-action-gcp-secrets
- Owner: nearform-actions
- Created: 2023-03-20T13:29:13.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-11-15T18:02:43.000Z (about 2 months ago)
- Last Synced: 2024-11-15T19:18:14.755Z (about 2 months ago)
- Topics: gcp, github-actions, google-cloud
- Language: JavaScript
- Homepage:
- Size: 2.34 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# github-action-gcp-secrets
GitHub action to create or update GCP secrets only if required.
The secret is created if it doesn't exist; a new version is added if the new one is different from the last version.## Input
| input | required | description |
|--------------|----------|-------------|
| `secrets` | yes | The list of secrets.
The attribute should be passed as a multiline string in the format `secret-name:secret-value` for each secret. |
| `project_id` | no | The GCP project identifier. If this parameter is not set, the default project is used. |Since the `secrets` are multiline, the `quote` is required. E.g:
```yaml
secret1:"${{ secrets.SECRET_1 }}"
secret2:"${{ secrets.SECRET_2 }}"
```## Standard Usage
Configure a workflow to run a job when continuous delivery is required.
```yaml
jobs:
provision:
name: 'Provision and deploy'
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: writesteps:
- uses: actions/checkout@v3- name: 'Authenticate with GCP'
uses: google-github-actions/auth@v1
with:
workload_identity_provider: ${{ inputs.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ inputs.GCP_SERVICE_ACCOUNT }}- name: 'Set up Cloud SDK'
uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ inputs.GCP_PROJECT_ID }}- uses: nearform-actions/github-action-gcp-secrets@v1
with:
secrets: |-
secret1:"${{ secrets.SECRET_1 }}"
secret2:"${{ secrets.SECRET_2 }}"...
```