This project provides a GitHub Action to generate a secure API key.
- Generate a secure API key
- Mask the key in the logs
- Set the key as an output
- Python 3.11+
secretslibrary
- name: Generate API Key
uses: <your_github_handle>/generate-api-key@v1.0
with:
KEY_LENGTH: <length_of_the_key>where
KEY_LENGTH is the length of the API key to be generated. Optional. Defaults to 32.
To view the generated key, you can access the output from the previous step or job.