Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmoradi committed Jul 3, 2024
1 parent db45c42 commit 3e9d6a8
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 8 deletions.
31 changes: 28 additions & 3 deletions .github/workflows/admin-sample.cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,39 @@ jobs:
dotnet new install Bit.Boilerplate.0.0.0.nupkg
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --serverUrl adminpanel.bitplatform.dev --filesStorage AzureBlobStorage
- name: Update appsettings.json api server address
- name: Update core appsettings.json
uses: devops-actions/[email protected]
with:
files: 'AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}
ApplicationInsights.ConnectionString: ${{ secrets.APPLICATION_INSIGHTS_CONNECTION_STRING }}

- name: Update server appsettings.json
uses: devops-actions/[email protected]
with:
files: 'AdminPanel/src/Server/AdminPanel.Server/appsettings.Production.json'
env:
AppSettings__Email__DefaultFromEmail: [email protected]
AppSettings__Email__Host: smtp.sendgrid.net
AppSettings__Email__Password: ${{ secrets.SEND_GRID_PASSWORD }}
AppSettings__Email__Port: 25
AppSettings__Email__UserName: apikey
AppSettings__Sms__AccountSid: ${{ secrets.TWILIO_ACCOUNT_SID }}
AppSettings__Sms__AuthToken: ${{ secrets.TWILIO_AUTH_TOKEN }}
AppSettings__Sms__FromPhoneNumber: ${{ secrets.TWILIO_FROM_PHONE_NUMBER }}
Authentication__GitHub__ClientId: ${{ secrets.AUTH_GITHUB_CLIENT_ID }}
Authentication__GitHub__ClientSecret: ${{ secrets.AUTH_GITHUB_CLIENT_SECRET }}
Authentication__Google__ClientId: ${{ secrets.AUTH_GOOGLE_CLIENT_ID }}
Authentication__Google__ClientSecret: ${{ secrets.AUTH_GOOGLE_CLIENT_SECRET }}
Authentication__Twitter__ConsumerKey: ${{ secrets.AUTH_TWITTER_CONSUMER_KEY }}
Authentication__Twitter__ConsumerSecret: ${{ secrets.AUTH_TWITTER_CONSUMER_SECRET }}
DataProtectionCertificatePassword: ${{ secrets.DATA_PROTECTION_CERTIFICATE_PASSWORD }}
ForwardedHeaders__AllowedHosts: adminpanel.bitplatform.dev
ForwardedHeaders__ForwardedHostHeaderName: X-HOST # Cloudflare
ConnectionStrings__AzureBlobStorageSasUrl: ${{ secrets.AZURE_BLOB_STORAGE_SAS_URL }}
ConnectionStrings__PostgreSQLConnectionString: ${{ secrets.POSTGRES_SQL_CONNECTION_STRING }}

- uses: actions/setup-node@v4
with:
node-version: 20
Expand Down Expand Up @@ -229,7 +254,7 @@ jobs:
fileName: 'AdminPanel.keystore'
encodedString: ${{ secrets.ANDROID_RELEASE_KEYSTORE_FILE_BASE64 }}

- name: Update appsettings.json api server address
- name: Update core appsettings.json
uses: devops-actions/[email protected]
with:
files: 'AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json'
Expand Down Expand Up @@ -290,7 +315,7 @@ jobs:
dotnet new install Bit.Boilerplate.0.0.0.nupkg
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --appCenter --serverUrl adminpanel.bitplatform.dev --filesStorage AzureBlobStorage
- name: Update appsettings.json api server address
- name: Update core appsettings.json
uses: devops-actions/[email protected]
with:
files: 'AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json'
Expand Down
34 changes: 29 additions & 5 deletions .github/workflows/todo-sample.cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,39 @@ jobs:
dotnet new install Bit.Boilerplate.0.0.0.nupkg
cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample Todo --appInsights --serverUrl todo.bitplatform.dev --filesStorage AzureBlobStorage
- name: Update appsettings.json api server address
- name: Update core appsettings.json
uses: devops-actions/[email protected]
with:
files: 'TodoSample/src/Client/TodoSample.Client.Core/appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}
ApplicationInsights.ConnectionString: ${{ secrets.APPLICATION_INSIGHTS_CONNECTION_STRING }}

- name: Update server appsettings.json
uses: devops-actions/[email protected]
with:
files: 'TodoSample/src/Server/TodoSample.Server/appsettings.Production.json'
env:
AppSettings__Email__DefaultFromEmail: [email protected]
AppSettings__Email__Host: smtp.sendgrid.net
AppSettings__Email__Password: ${{ secrets.SEND_GRID_PASSWORD }}
AppSettings__Email__Port: 25
AppSettings__Email__UserName: apikey
AppSettings__Sms__AccountSid: ${{ secrets.TWILIO_ACCOUNT_SID }}
AppSettings__Sms__AuthToken: ${{ secrets.TWILIO_AUTH_TOKEN }}
AppSettings__Sms__FromPhoneNumber: ${{ secrets.TWILIO_FROM_PHONE_NUMBER }}
Authentication__GitHub__ClientId: ${{ secrets.AUTH_GITHUB_CLIENT_ID }}
Authentication__GitHub__ClientSecret: ${{ secrets.AUTH_GITHUB_CLIENT_SECRET }}
Authentication__Google__ClientId: ${{ secrets.AUTH_GOOGLE_CLIENT_ID }}
Authentication__Google__ClientSecret: ${{ secrets.AUTH_GOOGLE_CLIENT_SECRET }}
Authentication__Twitter__ConsumerKey: ${{ secrets.AUTH_TWITTER_CONSUMER_KEY }}
Authentication__Twitter__ConsumerSecret: ${{ secrets.AUTH_TWITTER_CONSUMER_SECRET }}
DataProtectionCertificatePassword: ${{ secrets.DATA_PROTECTION_CERTIFICATE_PASSWORD }}
ForwardedHeaders__AllowedHosts: todo.bitplatform.dev
ForwardedHeaders__ForwardedHostHeaderName: X-HOST # Cloudflare
ConnectionStrings__AzureBlobStorageSasUrl: ${{ secrets.AZURE_BLOB_STORAGE_SAS_URL }}
ConnectionStrings__PostgreSQLConnectionString: ${{ secrets.POSTGRES_SQL_CONNECTION_STRING }}

- name: Install wasm
run: cd src && dotnet workload install wasm-tools wasm-experimental

Expand Down Expand Up @@ -134,8 +159,7 @@ jobs:
with:
azPSVersion: "latest"
inlineScript: |
Connect-AzAccount
Stop-AzContainerApp -Name ${{ env.CONTAINER_APP_NAME }} -ResourceGroupName ${{ env.CONTAINER_RESOURCE_GROUP }}
Stop-AzContainerApp -Name ${{ env.CONTAINER_APP_NAME }} -ResourceGroupName ${{ env.CONTAINER_RESOURCE_GROUP }} -SubscriptionId ${{ secrets.SUBSCRIPTION_ID }}
Start-AzContainerApp -Name ${{ env.CONTAINER_APP_NAME }} -ResourceGroupName ${{ env.CONTAINER_RESOURCE_GROUP }}
- name: Purge cache
Expand Down Expand Up @@ -241,7 +265,7 @@ jobs:
fileName: 'TodoSample.keystore'
encodedString: ${{ secrets.ANDROID_RELEASE_KEYSTORE_FILE_BASE64 }}

- name: Update appsettings.json api server address
- name: Update core appsettings.json
uses: devops-actions/[email protected]
with:
files: 'TodoSample/src/Client/TodoSample.Client.Core/appsettings.json'
Expand Down Expand Up @@ -322,7 +346,7 @@ jobs:
dotnet new install Bit.Boilerplate.0.0.0.nupkg
cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample Todo --appInsights --appCenter --serverUrl todo.bitplatform.dev --filesStorage AzureBlobStorage
- name: Update appsettings.json api server address
- name: Update core appsettings.json
uses: devops-actions/[email protected]
with:
files: 'TodoSample/src/Client/TodoSample.Client.Core/appsettings.json'
Expand Down

0 comments on commit 3e9d6a8

Please sign in to comment.