Skip to content

Commit

Permalink
Updated logic for db erp
Browse files Browse the repository at this point in the history
StrahinjaJacimovic committed Sep 13, 2024
1 parent 202e0c0 commit 626d1f4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/updateDbFromSdk.yaml
Original file line number Diff line number Diff line change
@@ -50,10 +50,10 @@ jobs:
- name: Commit and Push Changes
run: |
if [[ ${{ steps.mikrosdk_payload.outputs.index }} == "Test" ]]; then
DB_NAME="necto_db_dev.db"
else
if [[ ${{ steps.mikrosdk_payload.outputs.index }} == "Live" ]]; then
DB_NAME="necto_db.db"
else
DB_NAME="necto_db_dev.db"
fi
STATUS=$(git status --short "$DB_NAME")
if [ -z "$STATUS" ]; then
@@ -64,8 +64,10 @@ jobs:
git add $DB_NAME
git commit -m "Updated $DB_NAME with latest merged release."
git push
curl --location --request POST '${{ secrets.ERP_DB_IMPORT_API }}' \
--header 'Authorization: Basic ${{ secrets.ERP_DB_IMPORT_KEY }}'
if [[ ${{ steps.mikrosdk_payload.outputs.index }} == "Live" ]]; then
curl --location --request POST '${{ secrets.ERP_DB_IMPORT_API }}' \
--header 'Authorization: Basic ${{ secrets.ERP_DB_IMPORT_KEY }}'
fi
fi
- name: Run Index Script

0 comments on commit 626d1f4

Please sign in to comment.