Merge pull request #164 from gabriel-samfira/use-apg-for-password

Use apg to generate passwords
This commit is contained in:
Gabriel 2023-08-22 22:32:40 +03:00 committed by GitHub
commit bc0a34bae9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,13 +39,11 @@ jobs:
- name: Generate secrets
run: |
function randomStringGenerator() {
tr -dc "a-zA-Z0-9@#%^&*()_+?><~;" </dev/urandom 2>/dev/null | head -c 64 ; echo '';
}
sudo apt-get -qq update && sudo apt-get -qq install -y apg
GARM_PASSWORD=$(randomStringGenerator)
REPO_WEBHOOK_SECRET=$(randomStringGenerator)
ORG_WEBHOOK_SECRET=$(randomStringGenerator)
GARM_PASSWORD=$(apg -n1 -m32)
REPO_WEBHOOK_SECRET=$(apg -n1 -m32)
ORG_WEBHOOK_SECRET=$(apg -n1 -m32)
echo "::add-mask::$GARM_PASSWORD"
echo "::add-mask::$REPO_WEBHOOK_SECRET"