A GitHub Action that uses git-secret-protector to decrypt secrets in a git-secret-protector
protected repository during a workflow run. The action cleans up the decrypted secrets after the job completes to maintain security.
- Automated Decryption: Seamlessly decrypts encrypted files using
git-secret-protector
. - Cleanup: Securely removes decrypted secrets after the workflow execution.
Include this action as a step in your workflow. Provide the required inputs for your environment and AES key.
filter
(required):The filter name to use with git-secret-protector (e.g.,sample-filter-dev
,sample-filter-prod
).
name: 'Build and Deploy'
on:
push:
branches:
- main
- develop
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Decrypt Secrets
uses: c0x12c/gh-actions-git-secret-protector@v1
with:
filter: 'sample-filter-dev'
# Add steps that require the decrypted secrets here
- name: Your Build Step
run: |
echo "Building application..."
# Your build commands here
# The action will automatically clean up the secrets after this point
This project is licensed under the Apache License 2.0.
Contributions are welcome! Please:
-
Fork the repository.
-
Create a new branch.
-
Commit your changes.
-
Submit a pull request.
-
For major changes, please open an issue first to discuss them.