Skip to content

Commit 2e424d2

Browse files
nadilaswaxb
authored andcommitted
fix: export env var for infisical run
1 parent 75dd475 commit 2e424d2

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/azure-pr-deploy.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,15 @@ jobs:
6666
6767
- name: Create Container App Environment
6868
run: |
69-
az containerapp env create \
70-
--name ${{ env.CONTAINER_APP_ENVIRONMENT }} \
71-
--resource-group ${{ env.AZURE_RESOURCE_GROUP }} \
72-
--location ${{ env.AZURE_LOCATION }}
69+
if ! az containerapp env show --name ${{ env.CONTAINER_APP_ENVIRONMENT }} --resource-group ${{ env.AZURE_RESOURCE_GROUP }} > /dev/null 2>&1; then
70+
echo "Creating Container App Environment: ${{ env.CONTAINER_APP_ENVIRONMENT }}"
71+
az containerapp env create \
72+
--name ${{ env.CONTAINER_APP_ENVIRONMENT }} \
73+
--resource-group ${{ env.AZURE_RESOURCE_GROUP }} \
74+
--location ${{ env.AZURE_LOCATION }}
75+
else
76+
echo "Container App Environment ${{ env.CONTAINER_APP_ENVIRONMENT }} already exists, skipping creation"
77+
fi
7378
7479
- name: Deploy API service
7580
run: |

apps/api/start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22
set -e
33
echo "Fetching secrets from Infisical..."
4-
INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id=$INFISICAL_CLIENT_ID --client-secret=$INFISICAL_CLIENT_SECRET --plain --silent)
4+
export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id=$INFISICAL_CLIENT_ID --client-secret=$INFISICAL_CLIENT_SECRET --plain --silent)
55
infisical run --projectId=$INFISICAL_PROJECT_ID --env=staging brease

0 commit comments

Comments
 (0)