https://github.com/nhedger/get-sops-secret
✅ Retrieve SOPS-encrypted secrets in GitHub Actions.
https://github.com/nhedger/get-sops-secret
github-actions sops
Last synced: about 1 year ago
JSON representation
✅ Retrieve SOPS-encrypted secrets in GitHub Actions.
- Host: GitHub
- URL: https://github.com/nhedger/get-sops-secret
- Owner: nhedger
- License: mit
- Created: 2023-06-14T21:10:35.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-25T10:23:50.000Z (almost 3 years ago)
- Last Synced: 2025-06-04T05:06:53.285Z (about 1 year ago)
- Topics: github-actions, sops
- Homepage:
- Size: 9.77 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yaml
- License: LICENSE.md
Awesome Lists containing this project
README
# Get SOPS secret in GitHub Actions
[](https://github.com/marketplace/actions/get-sops-secret)
[](https://github.com/nhedger/get-sops-secret/actions/workflows/test.yaml)
This actions provides a straightforward way to get a single secret from a SOPS encrypted file
and outputs it as a GitHub Actions output.
## Inputs
The following inputs are supported.
```yaml
- name: Get SOPS secret
uses: nhedger/get-sops-secret@v1
with:
# Path to the SOPS encrypted file that contains the secret.
# Required.
secrets-file: /path/to/secrets.yaml
# Name of the secret to retrieve
# Required.
secret-name: my-secret
# AGE private key
# Required.
age-private-key: ${{ secrets.AGE_PRIVATE_KEY }}
# SOPS version to use for decrypting the file.
# Optional.
# Default: latest
sops-version: latest
```
## Outputs
This actions returns single `secret` output with the value of the secret.
## Example
```yaml
- name: Get SOPS secret
uses: nhedger/get-sops-secret@v1
id: get-secret
with:
secrets-file: /path/to/secrets.yaml
secret-name: my-secret
age-private-key: ${{ secrets.AGE_PRIVATE_KEY }}
- name: Print secret
run: echo ${{ steps.get-secret.outputs.secret }}
```
## License
The scripts and documentation in this project are licensed under
the [MIT License](LICENSE.md).