Skip to content

Commit 24a117e

Browse files
chore: change the Substitution lib in ci
1 parent d38c344 commit 24a117e

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/github-cicd.yml

Lines changed: 3 additions & 3 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: cschleiden/replace-tokens@v1
45-
with:
46-
files: '${{ github.workspace }}/src/Api/appsettings.Testing-Deployment.json'
44+
uses: iamazeem/substitute-action@v1
4745
env:
4846
DB_CONNECTION: ${{ secrets.DB_CONNECTION_STRING }}
4947
S3_KEY: ${{ secrets.S3_KEY }}
5048
S3_SECRET: ${{ secrets.S3_SECRET }}
5149
JWT_SECRET: ${{ secrets.JWT_SECRET }}
50+
with:
51+
input-files: ${{ github.workspace }}/src/Api/appsettings.Testing-Deployment.json
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@
4141
"HealthCheckPath": "/api/health",
4242
"S3AwsSettings": {
4343
"ServiceUrl": "http://localhost:9000",
44-
"AccessKey": "#{S3_KEY}#",
45-
"SecretKey": "#{S3_SECRET}#",
44+
"AccessKey": "$S3_KEY",
45+
"SecretKey": "$S3_SECRET",
4646
"BucketName": "the-template-project",
4747
"PublicUrl": "http://localhost:9000",
4848
"PreSignedUrlExpirationInMinutes": 1440,
4949
"Protocol": 1
5050
},
5151
"SecuritySettings": {
5252
"JwtSettings": {
53-
"SecretKey": "#{JWT_SECRET}#",
53+
"SecretKey": "$JWT_SECRET",
5454
"ExpireTimeAccessTokenInMinute": 1440,
5555
"ExpireTimeRefreshTokenInDay": 7
5656
}
@@ -91,7 +91,7 @@
9191
"IsEnabled": false
9292
},
9393
"DatabaseSettings": {
94-
"DatabaseConnection": "#{DB_CONNECTION}#"
94+
"DatabaseConnection": "$DB_CONNECTION"
9595
},
9696
"CacheSettings": {
9797
"CachingExpirationInMinute": 5

0 commit comments

Comments
 (0)