Skip to content

Commit

Permalink
Check if password is correct
Browse files Browse the repository at this point in the history
  • Loading branch information
joergi committed Sep 14, 2024
1 parent ea797ce commit 9e4393f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,38 +26,34 @@ jobs:
- name: verifying vault
run: |
echo "Waiting for Vault to start..."
sleep 60
sleep 30
docker ps
echo "docker images"
export $(dbus-launch)
eval "$(echo '\n' | gnome-keyring-daemon --unlock)"
docker images
echo "export vault addr"
export VAULT_ADDR=http://127.0.0.1:8200
echo "vault status"
vault status
echo "login to vault"
vault login token=vault-plaintext-root-token
vault status
echo "after vault status"
mkdir $HOME/.superexport
touch $HOME/.superexport/.exported.sh
chmod +x $HOME/.superexport/.exported.sh
chmod +x superexport.sh
./superexport.sh MYKEY password /my-secrets/dev foo
echo "after export"
echo "reading secrets from from secret tools"
source $HOME/.superexport/.secretreader.sh
env
echo "after printing vault"
echo "MKEY" + $MYKEY
echo "GH_ENV=$MYKEY" >> $GITHUB_ENV
ls -lah
cd ..
ls -lah
pwd
- name: test again
- name: check if the password is correct
run: |
echo "MKEY" + ${{ env.GH_ENV }}
if [ ${{ env.GH_ENV }} = "test_password" ]; then
echo "password is correct"
exit 0
else
echo "password is wrong"
echo "password should be test_password but was ${{ env.GH_ENV }}
exit 1
fi
1 change: 0 additions & 1 deletion vault-docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ vault login token=vault-plaintext-root-token
echo "Initializing vault..."
vault secrets enable -version=1 -path=my-secrets kv
echo "Adding entries..."
vault kv put my-secrets/dev username=test_user
vault kv put my-secrets/dev password=test_password
echo "Complete..."

0 comments on commit 9e4393f

Please sign in to comment.