Skip to content

Commit 9f6bb7b

Browse files
chore: change Substitution lib
1 parent 66b2543 commit 9f6bb7b

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/github-cicd.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ jobs:
4141
- name: Build
4242
run: dotnet build --configuration Release --no-restore
4343
- name: App Settings Variable Substitution
44-
uses: microsoft/variable-substitution@v1
44+
- uses: cschleiden/replace-tokens@v1
4545
with:
46-
files: "${{ github.workspace }}/src/Api/appsettings.Testing-Deployment.json"
46+
files: '${{ github.workspace }}/src/Api/appsettings.Testing-Deployment.json'
4747
env:
48-
DatabaseSettings.DatabaseConnection: ${{secrets.DB_CONNECTION_STRING}}
49-
S3AwsSettings.AccessKey: ${{ secrets.S3_KEY }}
50-
S3AwsSettings.SecretKey: ${{ secrets.S3_SECRET }}
51-
SecuritySettings.JwtSettings.SecretKey: ${{ secrets.JWT_SECRET }}
48+
DB_CONNECTION: ${{ secrets.DB_CONNECTION_STRING }}
49+
S3_KEY: ${{ secrets.S3_KEY }}
50+
S3_SECRET: ${{ secrets.S3_SECRET }}
51+
JWT_SECRET: ${{ secrets.JWT_SECRET }}
5252
- name: Test
5353
run: dotnet test --no-restore --verbosity normal -e ASPNETCORE_ENVIRONMENT=Deployment
5454
- name: Publish Application

src/Api/appsettings.Testing-Deployment.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,16 @@
4141
"HealthCheckPath": "/api/health",
4242
"S3AwsSettings": {
4343
"ServiceUrl": "http://localhost:9000",
44+
"AccessKey": "#{S3_KEY}#",
45+
"SecretKey": "#{S3_SECRET}#",
4446
"BucketName": "the-template-project",
4547
"PublicUrl": "http://localhost:9000",
4648
"PreSignedUrlExpirationInMinutes": 1440,
4749
"Protocol": 1
4850
},
4951
"SecuritySettings": {
5052
"JwtSettings": {
53+
"SecretKey": "#{JWT_SECRET}#",
5154
"ExpireTimeAccessTokenInMinute": 1440,
5255
"ExpireTimeRefreshTokenInDay": 7
5356
}
@@ -87,6 +90,9 @@
8790
"ElasticsearchSettings": {
8891
"IsEnabled": false
8992
},
93+
"DatabaseSettings": {
94+
"DatabaseConnection": "#{DB_CONNECTION}#"
95+
},
9096
"CacheSettings": {
9197
"CachingExpirationInMinute": 5
9298
}

0 commit comments

Comments
 (0)