Skip to content

Commit

Permalink
Updating cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacobbrewer1 committed Oct 20, 2024
1 parent 865b66a commit 0dbcdce
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/database-migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,14 @@ jobs:
chmod +x vaultdb
mv vaultdb /usr/local/bin
export DATABASE_URL=$(vaultdb -addr="${{ secrets.VAULT_ADDR }}" -user="${{ secrets.VAULT_USER }}" -pass="${{ secrets.VAULT_PASS }}" -path="${{ secrets.VAULT_PATH }}" -host="${{ secrets.DATABASE_HOST }}" -schema="${{ secrets.DATABASE_SCHEMA }}")
if [ "${{ DATABASE_URL }}" == "" ]; then
DATABASE_URL=$(vaultdb -addr="${{ secrets.VAULT_ADDR }}" -user="${{ secrets.VAULT_USER }}" -pass="${{ secrets.VAULT_PASS }}" -path="${{ secrets.VAULT_PATH }}" -host="${{ secrets.DATABASE_HOST }}" -schema="${{ secrets.DATABASE_SCHEMA }}")
if [ "$DATABASE_URL" == "" ]; then
echo "Failed to authenticate with Vault. Exiting..."
exit 1
fi
# Set the DATABASE_URL environment variable
echo "DATABASE_URL=$DATABASE_URL" >> $GITHUB_ENV
fi
echo "DATABASE_URL is set. Continuing..."
Expand All @@ -88,7 +91,7 @@ jobs:
rm -f /usr/local/bin/goschema
rm -f /usr/local/bin/vaultdb
if [ "${{ secrets.DATABASE_URL }}" == "" ]; then
if [ "${{ env.DATABASE_URL }}" == "" ]; then
unset DATABASE_URL
fi
Expand Down

0 comments on commit 0dbcdce

Please sign in to comment.