1212 - master
1313 workflow_dispatch :
1414
15+ # Only update envs here if you need to change them for this workflow
1516env :
1617 DOCKER_BUILDKIT : 1
1718 KAMAL_REGISTRY_PASSWORD : ${{ secrets.GITHUB_TOKEN }}
@@ -31,20 +32,12 @@ jobs:
3132 echo "repository_name=$(echo ${{ github.repository }} | cut -d '/' -f 2)" >> $GITHUB_ENV
3233 echo "repository_name_lower=$(echo ${{ github.repository }} | cut -d '/' -f 2 | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
3334 echo "org_name=$(echo ${{ github.repository }} | cut -d '/' -f 1)" >> $GITHUB_ENV
34- if [ -n "${{ secrets.APPSETTINGS_PATCH }}" ]; then
35- echo "HAS_APPSETTINGS_PATCH=true" >> $GITHUB_ENV
36- else
37- echo "HAS_APPSETTINGS_PATCH=false" >> $GITHUB_ENV
38- fi
39- if [ -n "${{ secrets.KAMAL_DEPLOY_IP }}" ]; then
40- echo "HAS_DEPLOY_ACTION=true" >> $GITHUB_ENV
41- else
42- echo "HAS_DEPLOY_ACTION=false" >> $GITHUB_ENV
43- fi
4435
4536 # This step is for the deployment of the templates only, safe to delete
4637 - name : Modify csproj for template deploy
47- if : env.HAS_DEPLOY_ACTION == 'true'
38+ env :
39+ KAMAL_DEPLOY_IP : ${{ secrets.KAMAL_DEPLOY_IP }}
40+ if : env.KAMAL_DEPLOY_IP != null
4841 run : |
4942 sed -i 's#<ContainerLabel Include="service" Value="my-app" />#<ContainerLabel Include="service" Value="${{ env.repository_name_lower }}" />#g' MyApp/MyApp.csproj
5043
7669 run : dotnet tool install -g x
7770
7871 - name : Apply Production AppSettings
79- if : env.HAS_APPSETTINGS_PATCH == 'true'
72+ env :
73+ APPSETTINGS_PATCH : ${{ secrets.APPSETTINGS_PATCH }}
74+ if : env.APPSETTINGS_PATCH != null
8075 working-directory : ./MyApp
8176 run : |
8277 cat <<EOF >> appsettings.json.patch
0 commit comments