Open
Description
For now workflow_secret
supports setting just one key-value at once. Setting multiple secrets requires explicit looping over the keys:
$ cat key_val.txt
SECRET_KEY1=VALUE1
SECRET_KEY2=VALUE2
SECRET_KEY3=VALUE3
$ cat key_val.txt | while IFS='=' read key value; do
workflow_secret --owner=anna-money --repo=workflow-tools \
--token="YOUR-PERSONAL-ACCESS-TOKEN" \
update --key=$key --value=$value
done
{"message": "Secret updated"}
{"message": "Secret updated"}
{"message": "Secret updated"}
It's awkward, it requires to much coding. Let's support bulk operations to create/update secrets.
Things to take into consideration:
- GitHub is rate limiting requests to the API (5000 reqs/hour)
- Given the rate limits no async requests really needed, let's do it simple first
- Stick to existing
workflow_tools
convention: we can read secret key-value pairs fromenvfile
like we do inworkflow_generator
when invoked with option-e
Activity