Skip to content

Commit

Permalink
set spring boot admin credentials with secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
heinpa committed Jun 27, 2024
1 parent 830f964 commit ab7e00f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/deploy-component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ on:
jobs:
init-update:
runs-on: ubuntu-latest
env:
SPRING_BOOT_ADMIN_USER: ${{ secrets.SPRING_BOOT_ADMIN_USER }}
SPRING_BOOT_ADMIN_PASSWORD: ${{ secrets.SPRING_BOOT_ADMIN_PASSWORD }}
steps:
- name: Prepare deployment
run: bash -c ./service_config/prepare_dployment.sh
- uses: actions/checkout@v4
- name: Init update
uses: WSE-research/[email protected]
Expand Down
18 changes: 18 additions & 0 deletions service_config/prepare_deployment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# replace secrets
if [ -z "$SPRING_BOOT_ADMIN_USER" ]; then
echo "SPRING_BOOT_ADMIN_USER is not set. Check your secrets."
exit 2
else
sed -i "s/SPRING_BOOT_ADMIN_USER/$SPRING_BOOT_ADMIN_USER/g" ./service_config/files/qb-kgqanwrapper-dbpedia
sed -i "s/SPRING_BOOT_ADMIN_USER/$SPRING_BOOT_ADMIN_USER/g" ./service_config/files/qb-kgqanwrapper-wikidata
fi

if [ -z "$SPRING_BOOT_ADMIN_PASSWORD" ]; then
echo "SPRING_BOOT_ADMIN_PASSWORD is not set. Check your secrets."
exit 2
else
sed -i "s/SPRING_BOOT_ADMIN_PASSWORD/$SPRING_BOOT_ADMIN_PASSWORD/g" ./service_config/files/qb-kgqanwrapper-dbpedia
sed -i "s/SPRING_BOOT_ADMIN_PASSWORD/$SPRING_BOOT_ADMIN_PASSWORD/g" ./service_config/files/qb-kgqanwrapper-wikidata
fi

0 comments on commit ab7e00f

Please sign in to comment.